Encoding method and device therefor, and decoding method and device therefor

ABSTRACT

A video decoding method includes determining, based on an area of a current block, whether a multi-prediction combination mode for predicting the current block by combining prediction results obtained according to a plurality of prediction modes is applied to the current block, when the multi-prediction combination mode is applied to the current block, determining the plurality of prediction modes to be applied to the current block, generating a plurality of prediction blocks of the current block, according to the plurality of prediction modes, and determining a combined prediction block of the current block, by combining the plurality of prediction blocks according to respective weights.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation application of U.S. Application No. 17/054,347filed on Nov. 10, 2020, which is a National Stage of InternationalApplication of PCT/KR2019/005671 filed May 10, 2019, claiming prioritybased on U.S. Provisional Application No. 62/669,548 filed on May 10,2018, the contents of all of which are incorporated herein by referencein their entirety.

TECHNICAL FIELD

The present disclosure relates to a video encoding method and a videodecoding method, and more particularly, to a method of efficientlyencoding and decoding information about a motion vector.

BACKGROUND ART

A large amount of data is required when a high-quality video is encoded.However, because a bandwidth allowed to transmit video data is limited,a data rate applied to transmit the video data may be limited. Hence, inorder to efficiently transmit video data, there is demand for video dataencoding and decoding methods with minimal degradation of image qualityand increased compression rates.

Video data may be compressed by removing spatial redundancy and temporalredundancy between pixels. Because adjacent pixels generally have commoncharacteristics, encoding information is transmitted in a data unitconsisting of pixels in order to remove redundancy between the adjacentpixels.

Pixel values of the pixels included in the data unit are not directlytransmitted, but information about a method of obtaining the pixelvalues is transmitted. A prediction method of predicting a pixel valuethat is similar to an original value is determined for each data unit,and encoding information about the prediction method is transmitted froman encoder to a decoder. Because a predicted value is not completely thesame as the original value, residual data of a difference between theoriginal value and the predicted value is transmitted from the encoderto the decoder.

As the accuracy of prediction increases, encoding information requiredto specify a prediction method increases but a size of residual datadecreases. Accordingly, a prediction method is determined inconsideration of a size of residual data and encoding information. Inparticular, data units split from a picture have various sizes, and as asize of a data unit increases, the likelihood of the accuracy ofprediction decreasing increases whereas encoding information decreases.Accordingly, a size of a block is determined in accordance withcharacteristics of the picture.

Also, prediction methods include intra prediction and inter prediction.Intra prediction is a method of predicting pixels of a block fromneighboring pixels around the block. Inter prediction is a method ofpredicting pixels by referring to pixels of another picture referencedby a picture including the block. Accordingly, spatial redundancy isremoved in intra prediction, and temporal redundancy is removed in interprediction.

As the number of prediction methods increases, the amount of encodinginformation for indicating the prediction methods increases.Accordingly, when encoding information applied to a block is predictedfrom another block, a size of the encoding information may be reduced.

Because loss of video data is allowed to the extent that the human eyemay not recognize the loss, the amount of residual data may be reducedby performing lossy compression on the residual data according totransformation and quantization processes.

DESCRIPTION OF EMBODIMENTS Technical Problem

Provided are a video encoding method and a video encoding device whichencode a picture according to an inter mode. Also provided are a videodecoding method and a video decoding device which decode a pictureaccording to an inter mode. Also provided is a computer-readablerecording medium having recorded thereon a program for executing a videoencoding method and a video decoding method, according to an embodimentof the present disclosure, on a computer.

Solution to Problem

The present disclosure provides a video decoding method includingdetermining, based on an area of a current block, whether amulti-prediction combination mode for predicting the current block bycombining prediction results obtained according to a plurality ofprediction modes is applied to the current block, when themulti-prediction combination mode is applied to the current block,determining the plurality of prediction modes to be applied to thecurrent block, generating a plurality of prediction blocks of thecurrent block, according to the plurality of prediction modes, anddetermining a combined prediction block of the current block, bycombining the plurality of prediction blocks according to respectiveweights.

The present disclosure provides a video decoding method includingobtaining, from a bitstream, differential motion vector derivationinformation indicating whether a differential motion vector of a firstprediction direction is derived from a differential motion vector of asecond prediction direction, obtaining, from the bitstream, firstprediction motion vector information about a prediction motion vector ofthe first prediction direction, second prediction motion vectorinformation about a prediction motion vector of the second predictiondirection, and differential motion vector information about thedifferential motion vector of the second prediction direction,determining the prediction motion vector of the first predictiondirection and the prediction motion vector and the differential motionvector of the second prediction direction, according to the firstprediction motion vector information, the second prediction motionvector information, and the differential motion vector information, whenthe differential motion vector derivation information indicates that thedifferential motion vector of the first prediction direction is derivedfrom the differential motion vector of the second prediction direction,determining the differential motion vector of the first predictiondirection according to the differential motion vector of the secondprediction direction, determining a motion vector of the firstprediction direction according to the prediction motion vector and thedifferential motion vector of the first prediction direction, anddetermining a motion vector of the second prediction direction accordingto the prediction motion vector and the differential motion vector ofthe second prediction direction, and predicting the current blockaccording to the motion vector of the first prediction direction and themotion vector of the second prediction direction.

The present disclosure provides a video decoding method includingextracting a plurality of inter prediction candidates from neighboringblocks of a current block, by scanning the neighboring blocks of thecurrent block, according to a scan order, generating an inter predictioncandidate list including the plurality of inter prediction candidates,according to an inter prediction candidate order determined based on thescan order, changing the inter prediction candidate order of the interprediction candidate list, adaptively according to the current block orthe plurality of inter prediction candidates, and predicting the currentblock, based on the inter prediction candidate list in which the interprediction candidate order is changed.

The present disclosure provides a video decoding method includingobtaining a reference motion vector and a reference picture of aneighboring block adjacent to a current block, determining a referencepicture of the current block, adjusting the reference motion vector ofthe neighboring block, according to a temporal difference between thereference picture of the neighboring block and a current picture and atemporal difference between the reference picture of the current blockand the current picture, determining a motion vector of a sub-blockincluded in the current block, according to the adjusted referencemotion vector and a position of the sub-block of the current block, andpredicting the sub-block according to the motion vector of thesub-block.

The present disclosure provides a video decoding method includingdetermining a split mode of a current block, from among a rectangularsplit mode and a triangular split mode, splitting the current block intoa plurality of sub-blocks, according to the split mode of the currentblock, determining a prediction block of the plurality of sub-blocks,and smoothing prediction pixels located on a boundary line of theprediction block of the plurality of sub-blocks by using a smoothingfilter, wherein a number of filter coefficients and values of the filtercoefficients of the smoothing filter are determined according to thesplit mode of the current block.

The present disclosure provides a video encoding method corresponding tothe video decoding method.

The present disclosure provides a computer-recordable recording mediumhaving embodied thereon a program for executing the video encodingmethod and the video decoding method.

The technical problems of the present embodiment are not limited to theaforementioned technical problems, and other unstated technical problemsmay be inferred from embodiments below.

Advantageous Effects of Disclosure

Because an inter prediction candidate order is adaptively changedaccording to a current block and a plurality of inter prediction modes,coding efficiency may be improved. Because a reference motion vector isadjusted according to a reference picture of a current block in a motionvector (MV) planar mode, inter prediction accuracy may be improved.Because some of inter prediction elements are implicitly determined,coding efficiency may be improved. Because a combined prediction blockis smoothed in a multi-prediction combination mode, inter predictionaccuracy may be improved. Because pixels on a boundary surface aresmoothed in a triangular split mode, inter prediction accuracy may beimproved.

BRIEF DESCRIPTION OF DRAWINGS

In order to more fully understand the accompanying drawings, a briefexplanation of each drawing is provided.

FIG. 1A is a block diagram of an image encoding device based on codingunits having a tree structure, according to an embodiment of the presentdisclosure.

FIG. 1B is a block diagram of an image decoding device based on codingunits having a tree structure, according to an embodiment.

FIG. 2 illustrates a process of determining at least one coding unit bysplitting a current coding unit, according to an embodiment.

FIG. 3 illustrates a process of determining at least one coding unit bysplitting a non-square coding unit, according to an embodiment.

FIG. 4 illustrates a process of splitting a coding unit based on atleast one of block shape information and split shape information,according to an embodiment.

FIG. 5 illustrates a method of determining a coding unit from among anodd number of coding units, according to an embodiment.

FIG. 6 illustrates an order of processing a plurality of coding unitswhen the plurality of coding units are determined by splitting a currentcoding unit, according to an embodiment.

FIG. 7 illustrates a process of determining that a current coding unitis to be split into an odd number of coding units when the coding unitsare not processable in a coding order, according to an embodiment.

FIG. 8 illustrates a process of determining at least one coding unit bysplitting a first coding unit, according to an embodiment.

FIG. 9 illustrates that a shape into which a second coding unit issplittable is restricted when a non-square second coding unit determinedby splitting a first coding unit satisfies a predetermined condition,according to an embodiment.

FIG. 10 illustrates a process of splitting a square coding unit whensplit shape information indicates that the square coding unit is not tobe split into four square coding units, according to an embodiment.

FIG. 11 illustrates that a processing order between a plurality ofcoding units may be changed depending on a process of splitting a codingunit, according to an embodiment.

FIG. 12 illustrates a process of determining a depth of a coding unit asa shape and a size of the coding unit change, when the coding unit isrecursively split such that a plurality of coding units are determined,according to an embodiment.

FIG. 13 illustrates depths that are determinable based on shapes andsizes of coding units, and part indexes (PIDs) that are for identifyingthe coding units, according to an embodiment.

FIG. 14 illustrates that a plurality of coding units are determinedbased on a plurality of data units included in a picture, according toan embodiment.

FIG. 15 illustrates a processing block serving as a unit for determininga determination order of reference coding units included in a picture,according to an embodiment.

FIG. 16 is a block diagram of a video decoding device 1600 for decodinga current block according to an inter mode.

FIG. 17 illustrates positions of neighboring blocks of a current blockscanned according to a scan order.

FIG. 18 illustrates a method of generating a motion vector candidate ofa second prediction direction, by adjusting a motion vector candidate ofa first prediction direction.

FIG. 19 illustrates a method of changing an inter prediction candidateorder of an inter prediction candidate list.

FIG. 20 illustrates a method of changing an inter prediction candidateorder of an inter prediction candidate list of an affine merge mode.

FIG. 21 illustrates a prediction method of a current block according toa motion vector (MV) planar mode.

FIG. 22 illustrates a prediction method according to a multi-predictioncombination mode.

FIG. 23 illustrates a method of splitting a current block according to atriangular split mode.

FIG. 24 is a flowchart of a video decoding method of changing an interprediction order of an inter prediction candidate list.

FIG. 25 is a flowchart of a video decoding method of predicting acurrent block according to an MV planar mode.

FIG. 26 is a flowchart of a video decoding method of improving codingefficiency by determining a specific inter prediction element withoutparsing a bitstream.

FIG. 27 is a flowchart of a video decoding method of predicting acurrent block according to a multi-prediction combination mode.

FIG. 28 is a flowchart of a video decoding method of reconstructing acurrent block according to a triangular split mode.

FIG. 29 is a block diagram of a video encoding device for encoding acurrent block according to an inter mode.

FIG. 30 is a flowchart of a video encoding method of changing an interprediction order of an inter prediction candidate list.

FIG. 31 is a flowchart of a video encoding method of predicting acurrent block according to an MV planar mode.

FIG. 32 is a flowchart of a video encoding method of improving codingefficiency by not generating information about a specific interprediction element.

FIG. 33 is a flowchart of a video encoding method of predicting acurrent block according to a multi-prediction combination mode.

FIG. 34 is a flowchart of a video decoding method of reconstructing acurrent block according to a triangular split mode.

BEST MODE

Provided is a video decoding method including determining, based on anarea of a current block, whether a multi-prediction combination mode forpredicting the current block by combining prediction results obtainedaccording to a plurality of prediction modes is applied to the currentblock, when the multi-prediction combination mode is applied to thecurrent block, determining the plurality of prediction modes to beapplied to the current block, generating a plurality of predictionblocks of the current block, according to the plurality of predictionmodes, and determining a combined prediction block of the current block,by combining the plurality of prediction blocks according to respectiveweights.

Mode of Disclosure

The advantages and features of the present disclosure and methods ofachieving the advantages and features will be described more fully withreference to the accompanying drawings, in which embodiments of thedisclosure are shown. The present disclosure may, however, be embodiedin many different forms and should not be construed as being limited tothe embodiments set forth herein; rather these embodiments are providedso that this disclosure will be thorough and complete, and will fullyconvey the concept of the present disclosure to one of ordinary skill inthe art.

The terms used herein will be briefly described, and disclosedembodiments will be described in detail.

The terms used herein are those general terms currently widely used inthe art in consideration of functions in the present disclosure but theterms may vary according to the intention of one of ordinary skill inthe art, precedents, or new technology in the art. Also, some of theterms used herein may be arbitrarily chosen by the present applicant,and in this case, these terms are defined in detail below. Accordingly,the specific terms used herein should be defined based on the uniquemeanings thereof and the whole context of the present disclosure.

It is to be understood that the singular forms “a,” “an,” and “the”include plural referents unless the context clearly dictates otherwise.

It will be understood that when a certain part “includes” a certaincomponent, the part does not exclude another component but may furtherinclude another component, unless the context clearly dictatesotherwise. The term “∼ unit” used herein refers to a software componentor a hardware component such as a field-programmable gate array (FPGA)or an application-specific integrated circuit (ASIC), which performscertain tasks. However, the term “∼ unit” is not limited to software orhardware. A “∼ unit” may be configured to be in an addressable storagemedium or configured to operate one or more processors. Thus, a “∼ unit”may include, by way of example, components such as software components,object-oriented software components, class components, and taskcomponents, processes, functions, attributes, procedures, subroutines,segments of program code, drivers, firmware, microcode, circuitry, data,databases, data structures, tables, arrays, and variables. Thefunctionality provided by the components and “∼ units” may be combinedinto fewer components and “∼ units” or further separated into additionalcomponents and “∼ units”.

The term “current block” refers to one of a coding unit, a predictionunit, and a transform unit which are currently encoded or decoded. Forconvenience of explanation, a “current coding unit”, a “currentprediction unit”, and a “current transform unit” may be used when othertypes of blocks such as a prediction unit and a transform unit need tobe distinguished from one another. In addition, the term “lower block”refers to a data unit split from the “current block”. The term “upperblock” refers to a data unit including the “current block”.

Also, the term ‘sample’ used herein refers to data that is assigned to asampling location of an image and is to be processed. For example, pixelvalues in an image of a spatial domain or transform coefficients in atransform domain may be samples. A unit including at least one samplemay be defined as a block.

The present disclosure will now be described more fully with referenceto the accompanying drawings for one of ordinary skill in the art to beable to perform the present disclosure without any difficulty. Inaddition, portions irrelevant to the descriptions of the presentdisclosure will be omitted in the drawings for clear descriptions of thepresent disclosure.

FIG. 1A is a block diagram of an image encoding device 100 based oncoding units having a tree structure according to an embodiment of thepresent disclosure.

The image encoding device 100 includes an encoder 110 and a bitstreamgenerator 120.

The encoder 110 may first split one picture into one or more slices orone or more tiles. The encoder 110 splits a picture or a slice or a tileincluded in the picture into a plurality of largest coding unitsaccording to a size of a largest coding unit. The largest coding unitmay be a data unit having a size of 32x32, 64x64, 128x128, 256x256, orthe like, wherein a shape of the data unit is a square shape having awidth and length in powers of 2. The encoder 110 may provide largestcoding unit size information indicating the size of the largest codingunit to the bitstream generator 120. The bitstream generator 120 maycause the largest coding unit size information to be included in abitstream.

The encoder 110 determines coding units by splitting the largest codingunit. Whether to split a coding unit is determined according to whethersplitting the coding unit is efficient according to rate-distortionoptimization. Then, split information indicating whether the coding unitis split may be generated. The split information may be expressed byusing a flag.

A coding unit may be split by using various methods. For example, asquare coding unit may be split into four square coding units whosewidth and height are half those of the square coding unit. A squarecoding unit may be split into two rectangular coding units whose widthis half that of the square coding unit. A square coding unit may besplit into two rectangular coding units whose height is half that of thesquare coding unit. A square coding unit may be split into three codingunits by splitting a width or height at 1:2:1.

A rectangular coding unit whose width is twice a height may be splitinto two square coding units. A rectangular coding unit whose width istwice a height may be split into two rectangular coding units whosewidth is four times a height. A rectangular coding unit whose width istwice a height may be split into two rectangular coding units and onesquare coding unit by splitting a width at 1:2:1.

Likewise, a rectangular coding unit whose height is twice a width may besplit into two square coding units. Also, a rectangular coding unitwhose height is twice a width may be split into two rectangular codingunits whose height is four times a width. Likewise, a rectangular codingunit whose height is twice a width may be split into two rectangularcoding units and one square coding unit by splitting a height at 1:2:1.

When the image encoding device 100 may use two or more splittingmethods, information about splitting methods that may be used for codingunits among the splitting methods that may be used by the image encodingdevice 100 may be determined for each picture. Therefore, only specificsplitting methods may be determined to be used for each picture. Whenthe image encoding device 100 uses only one splitting method,information about a splitting method that may be used for coding unitsis not separately determined.

A coding unit having a preset size may be split by using a specificsplitting method. For example, when a size of a coding unit is 256x265,the coding unit may be set to be split into only four square units whosewidth and height are half those of the coding unit.

When split information of a coding unit indicates that the coding unitis split, split shape information indicating a splitting method of thecoding unit may be generated. When there is only one splitting methodthat may be used in a picture to which a coding unit belongs, splitshape information may not be generated. When a splitting method isadaptively determined to encoding information around a coding unit,split shape information may not be generated.

As described above, image data of a current picture is split intolargest coding units according to a maximum size of a coding unit. Eachof the largest coding units may include coding units hierarchicallysplit from the largest coding unit. A shape and a position of a lowercoding unit may be determined according to a split shape of an uppercoding unit. A minimum size of a coding unit that limits splitting ofthe coding unit may be preset.

The encoder 110 compares coding efficiency when a coding unit ishierarchically split with coding efficiency when the coding unit is notsplit. Then, the encoder 110 determines whether to split the coding unitaccording to a comparison result. When it is determined that it is moreefficient to split the coding unit, the encoder 110 splits the codingunit hierarchically. When it is determined that it is efficient not tosplit the coding unit according to the comparison result, the encoder110 does not split the coding unit. Whether to split a coding unit maybe determined regardless of whether adjacent coding units are split.

A finally split coding unit may be predicted by using intra predictionor inter prediction. Intra prediction is a method of predicting samplesof a prediction unit by using reference samples around the predictionunit. Inter prediction is a method of predicting samples of a predictionunit by obtaining reference samples from a reference picture referencedby a current picture.

For intra prediction, the encoder 110 may select a most efficient intraprediction method by applying a plurality of intra prediction methods toa prediction unit. The intra prediction method includes a DC mode, aplanar mode, and a directional mode such as a vertical mode or ahorizontal mode.

When a reconstructed sample around a coding unit is used as a referencesample, intra prediction may be performed for each prediction unit.However, when a reconstructed sample in a coding unit is used as areference sample, reconstruction of the reference sample in the codingunit has to precede prediction, and thus a prediction order of aprediction unit may depend on a transformation order of a transformunit. Therefore, when the reconstructed sample in the coding unit isused as the reference sample, only an intra prediction method fortransform units corresponding to the prediction unit may be determined,and actual intra prediction may be performed for each transform unit.

The encoder 110 may select a most efficient inter prediction method bydetermining an optimal motion vector and an optimal reference picture.For inter prediction, a coding unit determiner 120 (the encoder 110?)may determine a plurality of motion vector candidates from a coding unitthat is spatially and temporally adjacent to a current coding unit, andmay determine, from among the motion vector candidates, a most efficientmotion vector as a motion vector. Likewise, the encoder 110 maydetermine a plurality of reference picture candidates from the codingunit that is spatially and temporally adjacent to the current codingunit, and may determine a most efficient reference picture from amongthe reference picture candidates. According to an embodiment, thereference picture may be determined from reference picture lists thatare pre-determined for a current picture. According to the embodiment,for accuracy of prediction, the most efficient motion vector from amongthe plurality of motion vector candidates may be determined as aprediction motion vector, and a motion vector may be determined bycorrecting the prediction motion vector. Inter prediction may beperformed in parallel for each prediction unit in the coding unit.

The encoder 110 may reconstruct a coding unit by obtaining onlyinformation indicating a motion vector and a reference picture accordingto a skip mode. According to the skip mode, all encoding informationincluding a residual signal is skipped, except for the informationindicating the motion vector and the reference picture. Because theresidual signal is skipped, the skip mode may be used when accuracy ofprediction is very high.

A partition mode to be used may be limited according to a predictionmethod for a prediction unit. For example, only partition modes for aprediction unit having a size of 2Nx2N or NxN may be applied to intraprediction, whereas partition modes for a prediction unit having a sizeof 2Nx2N, 2NxN, Nx2N, or NxN may be applied to inter prediction. Inaddition, only a partition mode for a prediction unit having a size of2Nx2N may be applied to a skip mode of the inter prediction. A partitionmode for each prediction method in the image encoding device 100 mayvary according to coding efficiency.

The image encoding device 100 may perform transformation based on acoding unit. The image encoding device 100 may transform residual datathat is a difference value between an original value and a predictionvalue with respect to pixels included in a coding unit, through acertain process. For example, the image encoding device 100 may performlossy-compression on the residual data through quantization and discretecosine transform (DCT)/discrete sine transform (DST). Alternatively, theimage encoding device 100 may perform lossless-compression on theresidual data without quantization.

In conclusion, the encoder 110 determines a most efficient predictionmethod for a current coding unit from among a plurality of intraprediction methods and inter prediction methods. Then, the encoder 110determines a prediction method for the current coding unit according tocoding efficiency according to a prediction result. Likewise, theencoder 110 determines a transformation method according to codingefficiency according to a transformation result. Coding efficiency of acoding unit is finally determined according to a most efficient codingunit prediction method and transformation method determination scheme.The encoder 110 finalizes a hierarchical structure of a largest codingunit according to coding efficiency of a coding unit that is finallysplit.

The encoder 110 may measure coding efficiency of coding units,prediction efficiency of prediction methods, or the like by usingrate-distortion optimization based on Lagrangian multipliers.

The encoder 110 may generate split information indicating whether tosplit a coding unit according to the determined hierarchical structureof the largest coding unit. Then, the encoder 110 may generate, forsplit coding units, partition mode information for determining aprediction unit and transform unit split information for determining atransform unit. In addition, when the coding unit may be split by usingat least two splitting methods, the encoder 110 may generate both splitinformation and split shape information that indicates a splittingmethod. The encoder 110 may generate information about a predictionmethod and a transformation method that are used for the prediction unitand the transform unit.

The bitstream generator 120 may output, in a bitstream, a plurality ofpieces of information generated by the encoder 110 according to thehierarchical structure of the largest coding unit.

A method of determining a coding unit, a prediction unit, and atransform unit according to a tree structure of a largest coding unitaccording to an embodiment will be described below in detail withreference to FIGS. 3 through 12 .

FIG. 1B is a block diagram of an image decoding device 150 based oncoding units having a tree structure according to an embodiment.

The image decoding device 150 includes a receiver 160 and a decoder 170.

Definitions of the terms including a coding unit, a prediction unit, atransform unit, various split information, etc. for a decoding operationperformed by the image decoding device 150 are the same as thosedescribed above with reference to FIG. 1A and the image encoding device100. Also, because the image decoding device 150 is designed toreconstruct image data, various encoding methods used by the imageencoding device 100 may be applied to the image decoding device 150.

The receiver 160 receives and parses a bitstream regarding an encodedvideo. The decoder 170 extracts, from the parsed bitstream, a pluralityof pieces of information for decoding largest coding units, and providesthe information to the decoder 170. The decoder 170 may extractinformation about a maximum size of a coding unit of a current picturefrom a header, a sequence parameter set, or a picture parameter set ofthe current picture.

The decoder 170 extracts, from the parsed bitstream, split informationof coding units having a tree structure according to each largest codingunit. The extracted split information is output to the decoder 170. Thedecoder 170 may split a largest coding unit according to the extractedsplit information, to determine a tree structure of the largest codingunit.

The split information extracted by the decoder 170 is split informationof a tree structure determined by the image encoding device 100 togenerate a minimum coding error. Therefore, the image decoding device150 may reconstruct an image by decoding data according to a decodingmethod that generates the minimum coding error.

The decoder 170 may extract split information of a data unit, such as aprediction unit and a transform unit included in a coding unit. Forexample, the decoder 170 may extract information about a most efficientpartition mode for a prediction unit. The decoder 170 may extracttransformation split information of a most efficient tree structure fora transform unit.

Also, the decoder 170 may obtain information about a most efficientprediction method for prediction units split from a coding unit. Then,the decoder 170 may obtain information about a most efficienttransformation method for transform units split from a coding unit.

The decoder 170 extracts information from a bitstream according to amethod in which the bitstream generator 120 of the image encoding device100 constructs the bitstream.

The decoder 170 may split a largest coding unit into coding units havinga most efficient tree structure based on split information. Then, thedecoder 170 may split a coding unit into prediction units according toinformation about a partition mode. The decoder 170 may split a codingunit into transform units according to transformation split information.

The decoder 170 may predict a prediction unit according to informationabout a prediction method. The decoder 170 may perform inversequantization and inverse transformation on residual data that is adifference between an original value and a prediction value of a pixelaccording to information about a method of transforming a transformunit. The decoder 170 may reconstruct pixels of a coding unit accordingto a prediction result of the prediction unit and a transformationresult of the transform unit.

FIG. 2 illustrates a process, performed by the image decoding device150, of determining at least one coding unit by splitting a currentcoding unit according to an embodiment.

According to an embodiment, the image decoding device 150 may determinea shape of a coding unit by using block shape information, and maydetermine a shape according to which the coding unit is to be split byusing split shape information. That is, a coding unit splitting method,which is indicated by the split shape information, may be determinedaccording to which block shape is indicated by the block shapeinformation used by the image decoding device 150.

According to an embodiment, the image decoding device 150 may use theblock shape information indicating that the current coding unit has asquare shape. For example, the image decoding device 150 may determinewhether not to split a square coding unit, whether to vertically splitthe square coding unit, whether to horizontally split the square codingunit, or whether to split the square coding unit into four coding unitsaccording to the split shape information. Referring to FIG. 2 , whenblock shape information of a current coding unit 200 indicates a squareshape, a decoder 180 may not split a coding unit 210 a having the samesize as the current coding unit 200 according to split shape informationindicating not to perform splitting, or may determine coding units 210b, 210 c, and 210 d split based on split shape information indicating acertain splitting method.

Referring to FIG. 2 , the image decoding device 150 may determine twocoding units 210 b obtained by vertically splitting the current codingunit 200 based on split shape information indicating to verticallyperform splitting according to an embodiment. The image decoding device150 may determine two coding units 210 c obtained by horizontallysplitting the current coding unit 200 based on split shape informationindicating to horizontally perform splitting. The image decoding device150 may determine four coding units 210 d obtained by vertically andhorizontally splitting the current coding unit 200 based on split shapeinformation indicating to vertically and horizontally perform splitting.However, a split shape for splitting a square coding unit may not belimited to the above shapes, and may include various shapes that may beindicated by split shape information. Split shapes for splitting asquare coding unit will be described in detail below through variousembodiments.

FIG. 3 illustrates a process, performed by the image decoding device150, of determining at least one coding unit by splitting a non-squarecoding unit according to an embodiment.

According to an embodiment, the image decoding device 150 may use blockshape information indicating that a current coding unit has a non-squareshape. The image decoding device 150 may determine, according to splitshape information, whether not to split the current non-square codingunit or whether to split the non-square current coding unit by using acertain method. Referring to FIG. 3 , when block shape information of acurrent coding unit 300 or 350 indicates a non-square shape, the imagedecoding device 150 may not split a coding unit 310 or 360 having thesame size as the current coding unit 300 or 350 according to split shapeinformation indicating not to perform splitting, or may determine codingunits 320 a, 320 b, 330 a, 330 b, 330 c, 370 a, 370 b, 380 a, 380 b, and380 c split according to split shape information indicating a certainsplitting method. A certain splitting method of splitting a non-squarecoding unit will be described in detail below through variousembodiments.

According to an embodiment, the image decoding device 150 may determinea shape according to which a coding unit is split by using the splitshape information, and in this case, the split shape information mayindicate the number of at least one coding unit generated when thecoding unit is split. Referring to FIG. 3 , when the split shapeinformation indicates that the current coding unit 300 or 350 is splitinto two coding units, the image decoding device 150 may determine twocoding units 320 a and 320 b or 370 a and 370 b, which are respectivelyincluded in the current coding unit 300 or 350 by splitting the currentcoding unit 300 or 350 based on the split shape information.

According to an embodiment, when the image decoding device 150 splitsthe current coding unit 300 or 350 having the non-square shape based onthe split shape information, the image decoding device 150 may split thecurrent coding unit 300 or 350 having the non-square shape inconsideration of a location of a long side of the current coding unit300 or 350. For example, the image decoding device 150 may determine aplurality of coding units by splitting the current coding unit 300 or350 in a direction of splitting the long side of the current coding unit300 or 350 in consideration of the shape of the current coding unit 300or 350.

According to an embodiment, when the split shape information indicatesthat a coding unit is split into an odd number of blocks, the imagedecoding device 150 may determine an odd number of coding units includedin the current coding unit 300 or 350. For example, when the split shapeinformation indicates that the current coding unit 300 or 350 is splitinto three coding units, the image decoding device 150 may split thecurrent coding unit 300 or 350 into three coding units 330 a, 330 b, and330 c or 380 a, 380 b, and 380 c. According to an embodiment, the imagedecoding device 150 may determine the odd number of coding unitsincluded in the current coding unit 300 or 350, and sizes of thedetermined coding units may not be the same. For example, a size of thecoding unit 330 b or 380 b from among the odd number of coding units 330a, 330 b, and 330 c or 380 a, 380 b, and 380 c may be different fromsizes of the coding units 330 a and 330 c or 380 a and 380 c. That is,coding units that may be determined when the current coding unit 300 or350 is split may have multiple sizes.

According to an embodiment, when the split shape information indicatesthat a coding unit is split into an odd number of blocks, the imagedecoding device 150 may determine an odd number of coding units includedin the current coding unit 300 or 350 and may put a restriction on atleast one coding unit from among the odd number of coding unitsgenerated by splitting the current coding unit 300 or 350. Referring toFIG. 3 , the image decoding device 150 may decode the coding unit 330 bor 380 b at the center of the three coding units 330 a, 330 b, and 330 cor 380 a, 380 b, and 380 c generated when the current coding unit 300 or350 is split, in a different manner from the coding units 330 a and 330c or 380 a and 380 c. For example, the image decoding device 150 mayrestrict the coding unit 330 b or 380 b at the center not to be furthersplit or to be split only a certain number of times, unlike the codingunits 330 a and 330 c or 380 a and 380 c.

FIG. 4 illustrates a process, performed by the image decoding device150, of splitting a coding unit based on at least one of block shapeinformation and split shape information according to an embodiment.

According to an embodiment, the image decoding device 150 may determineto split or not to split a square first coding unit 400 into codingunits based on at least one of the block shape information and the splitshape information. According to an embodiment, when the split shapeinformation indicates to split the first coding unit 400 in a horizontaldirection, the image decoding device 150 may determine a second codingunit 410 by splitting the first coding unit 400 in a horizontaldirection. A first coding unit, a second coding unit, and a third codingunit used according to an embodiment are terms used to understand arelation before and after splitting a coding unit. For example, thesecond coding unit may be determined by splitting the first coding unit,and the third coding unit may be determined by splitting the secondcoding unit. It will be understood that a relationship among the firstcoding unit, the second coding unit, and the third coding unit appliesto the following descriptions.

According to an embodiment, the image decoding device 150 may determineto split or not to split the determined second coding unit 410 intocoding units, based on at least one of the block shape information andthe split shape information. Referring to FIG. 4 , the image decodingdevice 150 may split the non-square second coding unit 410, which isdetermined by splitting the first coding unit 400, into one or morethird coding units 420 a, or 420 b, 420 c, and 420 d based on at leastone of the block shape information and the split shape information, ormay not split the non-square second coding unit 410. The image decodingdevice 150 may obtain at least one of the block shape information andthe split shape information, and may split a plurality of various-shapedsecond coding units (e.g., 410) by splitting the first coding unit 400,based on at least one of the obtained block shape information and splitshape information, and the second coding unit 410 may be split by usinga splitting method of the first coding unit 400 based on at least one ofthe block shape information and the split shape information. Accordingto an embodiment, when the first coding unit 400 is split into thesecond coding units 410 based on at least one of the block shapeinformation and the split shape information of the first coding unit400, the second coding unit 410 may also be split into the third codingunits 420 a, or 420 b, 420 c, and 420 d based on at least one of theblock shape information and the split shape information of the secondcoding unit 410. That is, a coding unit may be recursively split basedon at least one of the block shape information and the split shapeinformation of each coding unit. A method that may be used torecursively split a coding unit will be described below through variousembodiments.

According to an embodiment, the image decoding device 150 may split eachof the third coding units 420 a, or 420 b, 420 c, and 420 d into codingunits, based on at least one of the block shape information and thesplit shape information, or may determine not to split the second codingunit 410 based on at least one of the block shape information and thesplit shape information. According to an embodiment, the image decodingdevice 150 may split the non-square second coding unit 410 into the oddnumber of third coding units 420 b, 420 c, and 420 d. The image decodingdevice 150 may put a certain restriction on a third coding unit fromamong the odd number of third coding units 420 b, 420 c, and 420 d. Forexample, the image decoding device 150 may restrict the third codingunit 420 c at a center location from among the odd number of thirdcoding units 420 b, 420 c, and 420 d to be no longer split or to besplit a settable number of times. Referring to FIG. 4 , the imagedecoding device 150 may restrict the third coding unit 420 c, which isat the center location from among the odd number of third coding units420 b, 420 c, and 420 d included in the non-square second coding unit410, to be no longer split, to be split by using a certain splittingmethod (e.g., split into only four coding units or split into a shapecorresponding to that into which the second coding unit 410 is split),or to be split only a certain number of times (e.g., split only n times(where n>0)). However, the restrictions on the third coding unit 420 cat the center location are not limited to the above-described examples,and may include various restrictions for decoding the third coding unit420 c at the center location differently from the other third codingunits 420 b and 420 d.

According to an embodiment, the image decoding device 150 may obtain atleast one of block shape information and split shape information, whichis used to split a current coding unit, from a certain location in thecurrent coding unit.

According to an embodiment, when a current coding unit is split into acertain number of coding units, the image decoding device 150 may selectone of the coding units. Various methods that may be used to select oneof a plurality of coding units will be described below through variousembodiments.

According to an embodiment, the image decoding device 150 may split acurrent coding unit into a plurality of coding units, and may determinea coding unit at a certain location.

FIG. 5 illustrates a method, performed by the image decoding device 150,of determining a coding unit of a certain location from among an oddnumber of coding units according to an embodiment.

According to an embodiment, the image decoding device 150 may useinformation indicating locations of an odd number of coding units todetermine a coding unit at a center location from among the odd numberof coding units. Referring to FIG. 5 , the image decoding device 150 maydetermine an odd number of coding units 520 a, 520 b, and 520 c bysplitting a current coding unit 500. The image decoding device 150 maydetermine the coding unit 520 b at a center location by usinginformation about locations of the odd number of coding units 520 a, 520b, and 520 c. For example, the image decoding device 150 may determinethe coding unit 520 b of the center location by determining thelocations of the coding units 520 a, 520 b, and 520 c based oninformation indicating locations of certain samples included in thecoding units 520 a, 520 b, and 520 c. In detail, the image decodingdevice 150 may determine the coding unit 520 b at the center location bydetermining the locations of the coding units 520 a, 520 b, and 520 cbased on information indicating locations of top left samples 530 a, 530b, and 530 c of the coding units 520 a, 520 b, and 520 c.

According to an embodiment, the information indicating the locations ofthe top left samples 530 a, 530 b, and 530 c, which are included in thecoding units 520 a, 520 b, and 520 c, respectively, may includeinformation about locations or coordinates of the coding units 520 a,520 b, and 520 c in a picture. According to an embodiment, theinformation indicating the locations of the top left samples 530 a, 530b, and 530 c, which are respectively included in the coding units 520 a,520 b, and 520 c, may include information indicating widths or heightsof the coding units 520 a, 520 b, and 520 c included in the currentcoding unit 500, and the widths or heights may correspond to informationindicating differences between the coordinates of the coding units 520a, 520 b, and 520 c in the picture. That is, the image decoding device150 may determine the coding unit 520 b at the center location bydirectly using the information about the locations or coordinates of thecoding units 520 a, 520 b, and 520 c in the picture, or by using theinformation about the widths or heights of the coding units, whichcorrespond to difference values between the coordinates.

According to an embodiment, information indicating the location of thetop left sample 530 a of the upper coding unit 520 a may includecoordinates (xa, ya), information indicating the location of the topleft sample 530 b of the middle coding unit 520 b may includecoordinates (xb, yb), and information indicating the location of the topleft sample 530 c of the lower coding unit 520 c may include coordinates(xc, yc). The image decoding device 150 may determine the middle codingunit 520 b by using the coordinates of the top left samples 530 a, 530b, and 530 c which are included in the coding units 520 a, 520 b, and520 c, respectively. For example, when the coordinates of the top leftsamples 530 a, 530 b, and 530 c are sorted in an ascending or descendingorder, the coding unit 520 b including the coordinates (xb, yb) of thesample 530 b at a center location may be determined as a coding unit ata center location from among the coding units 520 a, 520 b, and 520 cdetermined by splitting the current coding unit 500. However, thecoordinates indicating the locations of the top left samples 530 a, 530b, and 530 c may include coordinates indicating absolute locations inthe picture, or may use coordinates (dxb, dyb) indicating a relativelocation of the top left sample 530 b of the middle coding unit 520 band coordinates (dxc, dyc) indicating a relative location of the topleft sample 530 c of the lower coding unit 520 c, with reference to thelocation of the top left sample 530 a of the upper coding unit 520 a.Also, a method of determining a coding unit at a certain location byusing coordinates of a sample included in the coding unit as informationindicating a location of the sample is not limited to theabove-described method, and may include various arithmetic methodscapable of using the coordinates of the sample.

According to an embodiment, the image decoding device 150 may split thecurrent coding unit 500 into the plurality of coding units 520 a, 520 b,and 520 c, and may select one of the coding units 520 a, 520 b, and 520c based on a certain criterion. For example, the image decoding device150 may select the coding unit 520 b, which has a size different fromthat of the others, from among the coding units 520 a, 520 b, and 520 c.

According to an embodiment, the image decoding device 150 may determinethe widths or heights of the coding units 520 a, 520 b, and 520 c byusing the coordinates (xa, ya) indicating the location of the top leftsample 530 a of the upper coding unit 520 a, the coordinates (xb, yb)indicating the location of the top left sample 530 b of the middlecoding unit 520 b, and the coordinates (xc, yc) indicating the locationof the top left sample 530 c of the lower coding unit 520 c. The imagedecoding device 150 may determine sizes of the coding units 520 a, 520b, and 520 c by using the coordinates (xa, ya), (xb, yb), and (xc, yc)indicating the locations of the coding units 520 a, 520 b, and 520 c.

According to an embodiment, the image decoding device 150 may determinethe width of the upper coding unit 520 a to be xb-xa and the height ofthe upper coding unit 520 a to be yb-ya. According to an embodiment, theimage decoding device 150 may determine the width of the middle codingunit 520 b to be xc-xb and the height of the middle coding unit 520 b tobe yc-yb. According to an embodiment, the image decoding device 150 maydetermine the width or height of the lower coding unit 520 c by usingthe width or height of the current coding unit 500 and the widths andheights of the upper and middle coding units 520 a and 520 b. The imagedecoding device 150 may determine a coding unit, which has a sizedifferent from that of the others, based on the determined widths andheights of the coding units 520 a to 520 c. Referring to FIG. 5 , theimage decoding device 150 may determine the middle coding unit 520 b,which has a size different from the size of the upper and lower codingunits 520 a and 520 c, as the coding unit of the certain location.However, the above-described method, performed by the image decodingdevice 150, of determining a coding unit having a size different fromthe size of the other coding units merely corresponds to an example ofdetermining a coding unit at a certain location by using sizes of codingunits, which are determined based on coordinates of samples, and thusvarious methods of determining a coding unit at a certain location bycomparing sizes of coding units, which are determined based oncoordinates of certain samples, may be used.

However, locations of samples considered to determine locations ofcoding units are not limited to the above-described top left locations,and information about arbitrary locations of samples included in thecoding units may be used.

According to an embodiment, the image decoding device 150 may select acoding unit at a certain location from among an odd number of codingunits determined by splitting a current coding unit, considering a shapeof the current coding unit. For example, when the current coding unithas a non-square shape, a width of which is longer than a height, theimage decoding device 150 may determine the coding unit at the certainlocation in a horizontal direction. That is, the image decoding device150 may determine one of coding units at different locations in ahorizontal direction and may put a restriction on the coding unit. Whenthe current coding unit has a non-square shape, a height of which islonger than a width, the image decoding device 150 may determine thecoding unit at the certain location in a vertical direction. That is,the image decoding device 150 may determine one of coding units atdifferent locations in a vertical direction and may put a restriction onthe coding unit.

According to an embodiment, the image decoding device 150 may useinformation indicating respective locations of an even number of codingunits, to determine the coding unit at the certain location from amongthe even number of coding units. The image decoding device 150 maydetermine an even number of coding units by splitting the current codingunit, and may determine the coding unit at the certain location by usinginformation about locations of the even number of coding units. Anoperation related thereto may correspond to the operation of determininga coding unit at a certain location (e.g., a center location) from amongan odd number of coding units, which has been described in detail abovewith reference to FIG. 5 , and thus detailed descriptions thereof arenot provided here.

According to an embodiment, when a non-square current coding unit issplit into a plurality of coding units, certain information about acoding unit at a certain location may be used in a splitting operationto determine the coding unit at the certain location from among theplurality of coding units. For example, the image decoding device 150may use at least one of block shape information and split shapeinformation, which is stored in a sample included in a coding unit at acenter location, in a splitting operation to determine the coding unitat the center location from among the plurality of coding unitsdetermined by splitting the current coding unit.

Referring to FIG. 5 , the image decoding device 150 may split thecurrent coding unit 500 into the plurality of coding units 520 a, 520 b,and 520 c based on at least one of the block shape information and thesplit shape information, and may determine the coding unit 520 b at acenter location from among the plurality of the coding units 520 a, 520b, and 520 c. Furthermore, the image decoding device 150 may determinethe coding unit 520 b at the center location, in consideration of alocation from which at least one of the block shape information and thesplit shape information is obtained. That is, at least one of the blockshape information and the split shape information of the current codingunit 500 may be obtained from a sample 540 at a center location of thecurrent coding unit 500 and, when the current coding unit 500 is splitinto the plurality of coding units 520 a, 520 b, and 520 c based on atleast one of the block shape information and the split shapeinformation, the coding unit 520 b including the sample 540 may bedetermined as the coding unit at the center location. However,information used to determine the coding unit at the center location isnot limited to at least one of the block shape information and the splitshape information, and various kinds of information may be used todetermine the coding unit at the center location.

According to an embodiment, certain information for identifying thecoding unit at the certain location may be obtained from a certainsample included in a coding unit to be determined. Referring to FIG. 5 ,the image decoding device 150 may use at least one of the block shapeinformation and the split shape information, which is obtained from asample at a certain location in the current coding unit 500 (e.g., asample at a center location of the current coding unit 500) to determinea coding unit at a certain location from among the plurality of thecoding units 520 a, 520 b, and 520 c determined by splitting the currentcoding unit 500 (e.g., a coding unit at a center location from among aplurality of split coding units). That is, the image decoding device 150may determine the sample at the certain location by considering a blockshape of the current coding unit 500, may determine the coding unit 520b including a sample, from which certain information (e.g., at least oneof the block shape information and the split shape information) may beobtained, from among the plurality of coding units 520 a, 520 b, and 520c determined by splitting the current coding unit 500, and may put acertain restriction on the coding unit 520 b. Referring to FIG. 5 ,according to an embodiment, the image decoding device 150 may determinethe sample 540 at the center location of the current coding unit 500 asthe sample from which the certain information may be obtained, and mayput a certain restriction on the coding unit 520 b including the sample540, in a decoding operation. However, the location of the sample fromwhich the certain information may be obtained is not limited to theabove-described location, and may include arbitrary locations of samplesincluded in the coding unit 520 b to be determined for a restriction.

According to an embodiment, the location of the sample from which thecertain information may be obtained may be determined based on a shapeof the current coding unit 500. According to an embodiment, the blockshape information may indicate whether the current coding unit has asquare or non-square shape, and the location of the sample from whichthe certain information may be obtained may be determined based on theshape. For example, the image decoding device 150 may determine a samplelocated on a boundary for splitting at least one of a width and heightof the current coding unit in half, as the sample from which the certaininformation may be obtained, by using at least one of information aboutthe width of the current coding unit and information about the height ofthe current coding unit. As another example, when the block shapeinformation of the current coding unit indicates a non-square shape, theimage decoding device 150 may determine one of samples adjacent to aboundary for splitting a long side of the current coding unit in half,as the sample from which the certain information may be obtained.

According to an embodiment, when the current coding unit is split into aplurality of coding units, the image decoding device 150 may use atleast one of the block shape information and the split shape informationto determine a coding unit at a certain location from among theplurality of coding units. According to an embodiment, the imagedecoding device 150 may obtain at least one of the block shapeinformation and the split shape information from a sample at a certainlocation in a coding unit, and may split the plurality of coding units,which are generated by splitting the current coding unit, by using atleast one of the block shape information and the split shapeinformation, which is obtained from the sample of the certain locationin each of the plurality of coding units. That is, a coding unit may berecursively split based on at least one of the block shape informationand the split shape information, which is obtained from the sample atthe certain location in each coding unit. An operation of recursivelysplitting a coding unit has been described above with reference to FIG.4 , and thus detailed descriptions thereof will not be provided here.

According to an embodiment, the image decoding device 150 may determineone or more coding units by splitting the current coding unit, and maydetermine an order of decoding the one or more coding units based on acertain block (e.g., the current coding unit).

FIG. 6 illustrates an order of processing a plurality of coding unitswhen the image decoding device 150 determines the plurality of codingunits by splitting a current coding unit according to an embodiment.

According to an embodiment, the image decoding device 150 may determinesecond coding units 610 a and 610 b by splitting a first coding unit 600in a vertical direction, may determine second coding units 630 a and 630b by splitting the first coding unit 600 in a horizontal direction, ormay determine second coding units 650 a to 650 d by splitting the firstcoding unit 600 in vertical and horizontal directions, based on blockshape information and split shape information.

Referring to FIG. 6 , the image decoding device 150 may determine toprocess the second coding units 610 a and 610 b, which are determined bysplitting the first coding unit 600 in a vertical direction, in ahorizontal direction order 610 c. The image decoding device 150 maydetermine to process the second coding units 630 a and 630 b, which aredetermined by splitting the first coding unit 600 in a horizontaldirection, in a vertical direction order 630 c. The image decodingdevice 150 may determine to process the second coding units 650 a to 650d, which are determined by splitting the first coding unit 600 invertical and horizontal directions, according to a certain order (e.g.,a raster scan order or a Z-scan order 650 e) by which coding units in arow are processed and then coding units in a next row are processed.

According to an embodiment, the image decoding device 150 mayrecursively split coding units. Referring to FIG. 6 , the image decodingdevice 150 may determine the plurality of second coding units 610 a, 610b, 630 a, 630 b, 650 a, 650 b, 650 c, and 650 d by splitting the firstcoding unit 600, and may recursively split each of the determinedplurality of second coding units 610 a, 610 b, 630 a, 630 b, 650 a, 650b, 650 c, and 650 d. A method of splitting the plurality of secondcoding units 610 a, 610 b, 630 a, 630 b, 650 a, 650 b, 650 c, and 650 dmay correspond to a method of splitting the first coding unit 600.Accordingly, each of the plurality of second coding units 610 a, 610 b,630 a, 630 b, 650 a, 650 b, 650 c, and 650 d may be independently splitinto a plurality of coding units. Referring to FIG. 6 , the imagedecoding device 150 may determine the second coding units 610 a and 610b by splitting the first coding unit 600 in a vertical direction, andmay determine to independently split or not to split each of the secondcoding units 610 a and 610 b.

According to an embodiment, the image decoding device 150 may determinethird coding units 620 a and 620 b by splitting the left second codingunit 610 a in a horizontal direction, and may not split the right secondcoding unit 610 b.

According to an embodiment, a processing order of coding units may bedetermined based on an operation of splitting a coding unit. In otherwords, a processing order of split coding units may be determined basedon a processing order of coding units immediately before being split.The image decoding device 150 may determine a processing order of thethird coding units 620 a and 620 b determined by splitting the leftsecond coding unit 610 a, independently of the right second coding unit610 b. Because the third coding units 620 a and 620 b are determined bysplitting the left second coding unit 610 a in a horizontal direction,the third coding units 620 a and 620 b may be processed in a verticaldirection order 620 c. Because the left and right second coding units610 a and 610 b are processed in the horizontal direction order 610 c,the right second coding unit 610 b may be processed after the thirdcoding units 620 a and 620 b included in the left second coding unit 610a are processed in the vertical direction order 620 c. An operation ofdetermining a processing order of coding units based on a coding unitbefore being split is not limited to the above-described example, andvarious methods may be used to independently process coding units, whichare split and determined to various shapes, in a certain order.

FIG. 7 illustrates a process, performed by the image decoding device150, of determining that a current coding unit is to be split into anodd number of coding units when the coding units are not processable ina certain order according to an embodiment.

According to an embodiment, the image decoding device 150 may determinethat the current coding unit is split into an odd number of coding unitsbased on obtained block shape information and split shape information.Referring to FIG. 7 , a square first coding unit 700 may be split intonon-square second coding units 710 a and 710 b, and the second codingunits 710 a and 710 b may be independently split into third coding units720 a and 720 b, and 720 c to 720 e. According to an embodiment, theimage decoding device 150 may determine the plurality of third codingunits 720 a and 720 b by splitting the left second coding unit 710 a ina horizontal direction, and may split the right second coding unit 710 binto an odd number of third coding units 720 c to 720 e.

According to an embodiment, the image decoding device 150 may determinewhether any coding unit is split into an odd number of coding units, bydetermining whether the third coding units 720 a and 720 b, and 720 c to720 e are processable in a certain order. Referring to FIG. 7 , theimage decoding device 150 may determine the third coding units 720 a and720 b, and 720 c to 720 e by recursively splitting the first coding unit700. The image decoding device 150 may determine whether any of thefirst coding unit 700, the second coding units 710 a and 710 b, and thethird coding units 720 a and 720 b, and 720 c, 720 d, and 720 e is splitinto an odd number of coding units, based on at least one of block shapeinformation and split shape information. For example, a second codingunit located in the right from among the second coding units 710 a and710 b may be split into an odd number of third coding units 720 c, 720d, and 720 e. A processing order of a plurality of coding units includedin the first coding unit 700 may be a certain order (e.g., a Z-scanorder 730), and the image decoding device 150 may determine whether thethird coding units 720 c, 720 d, and 720 e, which are determined bysplitting the right second coding unit 710 b into an odd number ofcoding units, satisfy a condition for processing in the certain order.

According to an embodiment, the image decoding device 150 may determinewhether the third coding units 720 a and 720 b, and 720 c, 720 d, and720 e included in the first coding unit 700 satisfy the condition forprocessing in the certain order, and the condition relates to whether atleast one of a width and height of the second coding units 710 a and 710b is to be split in half along a boundary of the third coding units 720a and 720 b, and 720 c, 720 d, and 720 e. For example, although thethird coding units 720 a and 720 b determined by splitting the height ofthe non-square left second coding unit 710 a in half may satisfy thecondition, because boundaries of the third coding units 720 c, 720 d,and 720 e determined by splitting the right second coding unit 710 binto three coding units do not split the width or height of the rightsecond coding unit 710 b in half, it may be determined that the thirdcoding units 720 c, 720 d, and 720 e do not satisfy the condition. Whenthe condition is not satisfied as described above, the image decodingdevice 150 may decide disconnection of a scan order, and determine thatthe right second coding unit 710 b is to be split into an odd number ofcoding units, based on a result of the decision. According to anembodiment, when a coding unit is split into an odd number of codingunits, the image decoding device 150 may put a certain restriction on acoding unit at a certain location from among the split coding units, andthe restriction or the certain location has been described above throughvarious embodiments and thus detailed descriptions thereof will not beprovided here.

FIG. 8 illustrates a process, performed by the image decoding device150, of determining at least one coding unit by splitting a first codingunit 800 according to an embodiment. According to an embodiment, theimage decoding device 150 may split the first coding unit 800, based onat least one of block shape information and split shape information,which is obtained by the receiver 160. The square first coding unit 800may be split into four square coding units, or may be split into aplurality of non-square coding units. For example, referring to FIG. 8 ,when the block shape information indicates that the first coding unit800 has a square shape and the split shape information indicates tosplit the first coding unit 800 into non-square coding units, the imagedecoding device 150 may split the first coding unit 800 into a pluralityof non-square coding units. In detail, when the split shape informationindicates to determine an odd number of coding units by splitting thefirst coding unit 800 in a horizontal direction or a vertical direction,the image decoding device 150 may split the square first coding unit 800into an odd number of coding units, e.g., second coding units 810 a, 810b, and 810 c determined by splitting the square first coding unit 800 ina vertical direction or second coding units 820 a, 820 b, and 820 cdetermined by splitting the square first coding unit 800 in a horizontaldirection.

According to an embodiment, the image decoding device 150 may determinewhether the second coding units 810 a, 810 b, 810 c, 820 a, 820 b, and820 c included in the first coding unit 800 satisfy a condition forprocessing in a certain order, and the condition relates to whether atleast one of a width and height of the first coding unit 800 is split inhalf along a boundary of the second coding units 810 a, 810 b, 810 c,820 a, 820 b, and 820 c. Referring to FIG. 8 , because boundaries of thesecond coding units 810 a, 810 b, and 810 c determined by splitting thesquare first coding unit 800 in a vertical direction do not split thewidth of the first coding unit 800 in half, it may be determined thatthe first coding unit 800 does not satisfy the condition for processingin the certain order. In addition, because boundaries of the secondcoding units 820 a, 820 b, and 820 c determined by splitting the squarefirst coding unit 800 in a horizontal direction do not split the widthof the first coding unit 800 in half, it may be determined that thefirst coding unit 800 does not satisfy the condition for processing inthe certain order. When the condition is not satisfied as describedabove, the image decoding device 150 may decide disconnection of a scanorder, and may determine that the first coding unit 800 is split into anodd number of coding units based on a result of the decision. Accordingto an embodiment, when a coding unit is split into an odd number ofcoding units, the image decoding device 150 may put a certainrestriction on a coding unit at a certain location from among the splitcoding units, and the restriction or the certain location has beendescribed above through various embodiments and thus detaileddescriptions thereof will not be provided here.

According to an embodiment, the image decoding device 150 may determinevarious-shaped coding units by splitting a first coding unit.

Referring to FIG. 8 , the image decoding device 150 may split the squarefirst coding unit 800 or a non-square first coding unit 830 or 850 intovarious-shaped coding units.

FIG. 9 illustrates that a shape into which a second coding unit issplittable by the image decoding device 150 is restricted when anon-square second coding unit determined by splitting a first codingunit 900 satisfies a certain condition according to an embodiment.

According to an embodiment, the image decoding device 150 may determineto split the square first coding unit 900 into non-square second codingunits 910 a, 910 b, 920 a, and 920 b, based on at least one of blockshape information and split shape information, which is obtained by thereceiver 160. The second coding units 910 a, 910 b, 920 a, and 920 b maybe independently split. As such, the image decoding device 150 maydetermine to split or not to split the first coding unit 900 into aplurality of coding units, based on at least one of the block shapeinformation and the split shape information of each of the second codingunits 910 a, 910 b, 920 a, and 920 b. According to an embodiment, theimage decoding device 150 may determine third coding units 912 a and 912b by splitting the non-square left second coding unit 910 a, which isdetermined by splitting the first coding unit 900 in a verticaldirection, in a horizontal direction. However, when the left secondcoding unit 910 a is split in a horizontal direction, the image decodingdevice 150 may restrict the right second coding unit 910 b to not besplit in a horizontal direction in which the left second coding unit 910a is split. When third coding units 914 a and 914 b are determined bysplitting the right second coding unit 910 b in the same direction,because the left and right second coding units 910 a and 910 b areindependently split in a horizontal direction, the third coding units912 a, 912 b, 914 a, and 914 b may be determined. However, this caseserves equally as a case in which the image decoding device 150 splitsthe first coding unit 900 into four square second coding units 930 a,930 b, 930 c, and 930 d, based on at least one of the block shapeinformation and the split shape information, and may be inefficient interms of image decoding.

According to an embodiment, the image decoding device 150 may determinethird coding units 922 a, 922 b, 924 a, and 924 b by splitting thenon-square second coding unit 920 a or 920 b, which is determined bysplitting the first coding unit 900 in a horizontal direction, in avertical direction. However, when a second coding unit (e.g., the uppersecond coding unit 920 a) is split in a vertical direction, for theabove-described reason, the image decoding device 150 may restrict theother second coding unit (e.g., the lower second coding unit 920 b) tonot be split in a vertical direction in which the upper second codingunit 920 a is split.

FIG. 10 illustrates a process, performed by the image decoding device150, of splitting a square coding unit when split shape informationindicates that the square coding unit is not to be split into foursquare coding units according to an embodiment.

According to an embodiment, the image decoding device 150 may determinesecond coding units 1010 a, 1010 b, 1020 a, 1020 b, etc. by splitting afirst coding unit 1000 based on at least one of block shape informationand split shape information. The split shape information may includeinformation about various methods of splitting a coding unit but, theinformation about various splitting methods may not include informationfor splitting a coding unit into four square coding units. According tosuch split shape information, the image decoding device 150 may notsplit the first square coding unit 1000 into four square second codingunits 1030 a, 1030 b, 1030 c, and 1030 d. The image decoding device 150may determine the non-square second coding units 1010 a, 1010 b, 1020 a,1020 b, etc., based on the split shape information.

According to an embodiment, the image decoding device 150 mayindependently split the non-square second coding units 1010 a, 1010 b,1020 a, 1020 b, etc. Each of the second coding units 1010 a, 1010 b,1020 a, 1020 b, etc. may be recursively split in a certain order, andthis splitting method may correspond to a method of splitting the firstcoding unit 1000 based on at least one of the block shape informationand the split shape information.

For example, the image decoding device 150 may determine square thirdcoding units 1012 a and 1012 b by splitting the left second coding unit1010 a in a horizontal direction, and may determine square third codingunits 1014 a and 1014 b by splitting the right second coding unit 1010 bin a horizontal direction. Furthermore, the image decoding device 150may determine square third coding units 1016 a, 1016 b, 1016 c, and 1016d by splitting both the left and right second coding units 1010 a and1010 b in a horizontal direction. In this case, coding units having thesame shape as the four square second coding units 1030 a, 1030 b, 1030c, and 1030 d split from the first coding unit 1000 may be determined.

As another example, the image decoding device 150 may determine squarethird coding units 1022 a and 1022 b by splitting the upper secondcoding unit 1020 a in a vertical direction, and may determine squarethird coding units 1024 a and 1024 b by splitting the lower secondcoding unit 1020 b in a vertical direction. Furthermore, the imagedecoding device 150 may determine square third coding units 1026 a, 1026b, 1026 c, and 1026 d by splitting both the upper and lower secondcoding units 1020 a and 1020 b in a vertical direction. In this case,coding units having the same shape as the four square second codingunits 1030 a, 1030 b, 1030 c, and 1030 d split from the first codingunit 1000 may be determined.

FIG. 11 illustrates that a processing order between a plurality ofcoding units may be changed depending on a process of splitting a codingunit according to an embodiment.

According to an embodiment, the image decoding device 150 may split afirst coding unit 1100 based on block shape information and split shapeinformation. When the block shape information indicates a square shapeand the split shape information indicates to split the first coding unit1100 in at least one of horizontal and vertical directions, the imagedecoding device 150 may determine second coding units 1110 a, 1110 b,1120 a, 1120 b, etc. by splitting the first coding unit 1100. Referringto FIG. 11 , the non-square second coding units 1110 a, 1110 b, 1120 a,and 1120 b determined by splitting the first coding unit 1100 in only ahorizontal direction or vertical direction may be independently splitbased on the block shape information and the split shape information ofeach coding unit. For example, the image decoding device 150 maydetermine third coding units 1116 a, 1116 b, 1116 c, and 1116 d bysplitting the second coding units 1110 a and 1110 b, which are generatedby splitting the first coding unit 1100 in a vertical direction, in ahorizontal direction, and may determine third coding units 1126 a, 1126b, 1126 c, and 1126 d by splitting the second coding units 1120 a and1120 b, which are generated by splitting the first coding unit 1100 in ahorizontal direction, in a horizontal direction. An operation ofsplitting the second coding units 1110 a, 1110 b, 1120 a, and 1120 b hasbeen described above with reference to FIG. 9 , and thus detaileddescriptions thereof will not be provided here.

According to an embodiment, the image decoding device 150 may processcoding units in a certain order. An operation of processing coding unitsin a certain order has been described above with reference to FIG. 6 ,and thus detailed descriptions thereof will not be provided here.Referring to FIG. 11 , the image decoding device 150 may determine foursquare third coding units 1116 a, 1116 b, 1116 c, and 1116 d, and 1126a, 1126 b, 1126 c, and 1126 d by splitting the square first coding unit1100. According to an embodiment, the image decoding device 150 maydetermine processing orders of the third coding units 1116 a, 1116 b,1116 c, and 1116 d, and 1126 a, 1126 b, 1126 c, and 1126 d based on asplitting method of the first coding unit 1100.

According to an embodiment, the image decoding device 150 may determinethe third coding units 1116 a, 1116 b, 1116 c, and 1116 d by splittingthe second coding units 1110 a and 1110 b generated by splitting thefirst coding unit 1100 in a vertical direction, in a horizontaldirection, and may process the third coding units 1116 a, 1116 b, 1116c, and 1116 d in a processing order 1117 for initially processing thethird coding units 1116 a and 1116 c, which are included in the leftsecond coding unit 1110 a, in a vertical direction and then processingthe third coding unit 1116 b and 1116 d, which are included in the rightsecond coding unit 1110 b, in a vertical direction.

According to an embodiment, the image decoding device 150 may determinethe third coding units 1126 a, 1126 b, 1126 c, and 1126 d by splittingthe second coding units 1120 a and 1120 b generated by splitting thefirst coding unit 1100 in a horizontal direction, in a verticaldirection, and may process the third coding units 1126 a, 1126 b, 1126c, and 1126 d in a processing order 1127 for initially processing thethird coding units 1126 a and 1126 b, which are included in the uppersecond coding unit 1120 a, in a horizontal direction and then processingthe third coding unit 1126 c and 1126 d, which are included in the lowersecond coding unit 1120 b, in a horizontal direction.

Referring to FIG. 11 , the square third coding units 1116 a, 1116 b,1116 c, and 1116 d, and 1126 a, 1126 b, 1126 c, and 1126 d may bedetermined by splitting the second coding units 1110 a, 1110 b, 1120 a,and 1120 b, respectively. Although the second coding units 1110 a and1110 b are determined by splitting the first coding unit 1100 in avertical direction differently from the second coding units 1120 a and1120 b which are determined by splitting the first coding unit 1100 in ahorizontal direction, the third coding units 1116 a, 1116 b, 1116 c, and1116 d, and 1126 a, 1126 b, 1126 c, and 1126 d split therefromeventually show same-shaped coding units split from the first codingunit 1100. As such, by recursively splitting a coding unit in differentmanners based on at least one of the block shape information and thesplit shape information, the image decoding device 150 may process aplurality of coding units in different orders even when the coding unitsare eventually determined to be the same shape.

FIG. 12 illustrates a process of determining a depth of a coding unit asa shape and a size of the coding unit change, when the coding unit isrecursively split such that a plurality of coding units are determinedaccording to an embodiment.

According to an embodiment, the image decoding device 150 may determinethe depth of the coding unit based on a certain criterion. For example,the certain criterion may be the length of a long side of the codingunit. When the length of a long side of a coding unit before being splitis 2n times (n>0) the length of a long side of a split current codingunit, the image decoding device 150 may determine that a depth of thecurrent coding unit is increased from a depth of the coding unit beforebeing split, by n. In the following descriptions, a coding unit havingan increased depth is expressed as a coding unit of a deeper depth.

Referring to FIG. 12 , according to an embodiment, the image decodingdevice 150 may determine a second coding unit 1202, a third coding unit1204, etc. of deeper depths by splitting a square first coding unit 1200based on block shape information indicating a square shape (e.g., theblock shape information may be expressed as ‘0: SQUARE’). Assuming thatthe size of the square first coding unit 1200 is 2Nx2N, the secondcoding unit 1202 determined by splitting a width and height of the firstcoding unit 1200 in half may have a size of NxN. Furthermore, the thirdcoding unit 1204 determined by splitting a width and height of thesecond coding unit 1202 in half may have a size of N/2xN/2. In thiscase, a width and height of the third coding unit 1204 correspond to ½times those of the first coding unit 1200. When a depth of the firstcoding unit 1200 is D, a depth of the second coding unit 1202, the widthand height of which are ½ times those of the first coding unit 1200, maybe D+1, and a depth of the third coding unit 1204, the width and heightof which are ½ times those of the first coding unit 1200, may be D+2.

According to an embodiment, the image decoding device 150 may determinea second coding unit 1212 or 1222, a third coding unit 1214 or 1224,etc. of deeper depths by splitting a non-square first coding unit 1210or 1220 based on block shape information indicating a non-square shape(e.g., the block shape information may be expressed as ‘1: NS_VER’indicating a non-square shape, a height of which is longer than a width,or as ‘2: NS_HOR’ indicating a non-square shape, a width of which islonger than a height).

The image decoding device 150 may determine the second coding unit 1202,1212, or 1222 by splitting at least one of a width and height of thefirst coding unit 1210 having a size of N×2N. That is, the imagedecoding device 150 may determine the second coding unit 1202 having asize of N×N or the second coding unit 1222 having a size of N×N/2 bysplitting the first coding unit 1210 in a horizontal direction, or maydetermine the second coding unit 1212 having a size of N/2×N bysplitting the first coding unit 1210 in horizontal and verticaldirections.

According to an embodiment, the image decoding device 150 may determinethe second coding unit 1202, 1212, or 1222 by splitting at least one ofa width and height of the first coding unit 1220 having a size of 2N×N.That is, the image decoding device 150 may determine the second codingunit 1202 having a size of N×N or the second coding unit 1212 having asize of N/2×N by splitting the first coding unit 1220 in a verticaldirection, or may determine the second coding unit 1222 having a size ofN×N/2 by splitting the first coding unit 1220 in horizontal and verticaldirections.

According to an embodiment, the image decoding device 150 may determinethe third coding unit 1204, 1214, or 1224 by splitting at least one of awidth and height of the second coding unit 1202 having a size of N×N.That is, the image decoding device 150 may determine the third codingunit 1204 having a size of N/2×N/2, the third coding unit 1214 having asize of N/2×N/2, or the third coding unit 1224 having a size of N/2×N/2by splitting the second coding unit 1202 in vertical and horizontaldirections.

According to an embodiment, the image decoding device 150 may determinethe third coding unit 1204, 1214, or 1224 by splitting at least one of awidth and height of the second coding unit 1212 having a size of N/2×N.That is, the image decoding device 150 may determine the third codingunit 1204 having a size of N/2×N/2 or the third coding unit 1224 havinga size of N/2×N/2 by splitting the second coding unit 1212 in ahorizontal direction, or may determine the third coding unit 1214 havinga size of N/2×N/2 by splitting the second coding unit 1212 in verticaland horizontal directions.

According to an embodiment, the image decoding device 150 may determinethe third coding unit 1204, 1214, or 1224 by splitting at least one of awidth and height of the second coding unit 1214 having a size of N×N/2.That is, the image decoding device 150 may determine the third codingunit 1204 having a size of N/2×N/2 or the third coding unit 1214 havinga size of N/2×N/2 by splitting the second coding unit 1212 in a verticaldirection, or may determine the third coding unit 1224 having a size ofN/2×N/2 by splitting the second coding unit 1212 in vertical andhorizontal directions.

According to an embodiment, the image decoding device 150 may split asquare coding unit (e.g., 1200, 1202, or 1204) in a horizontal orvertical direction. For example, the image decoding device 150 maydetermine the first coding unit 1210 having a size of N×2N by splittingthe first coding unit 1200 having a size of 2N×2N in a verticaldirection, or may determine the first coding unit 1220 having a size of2N×N by splitting the first coding unit 1200 in a horizontal direction.According to an embodiment, when a depth is determined based on thelength of a longest side of a coding unit, a depth of a coding unitdetermined by splitting the first coding unit 1200, 1202, or 1204 havinga size of 2N×2N in a horizontal or vertical direction may be the same asa depth of the first coding unit 1200, 1202, or 1204.

According to an embodiment, a width and height of the third coding unit1214 or 1224 may be ½ times those of the first coding unit 1210 or 1220.When a depth of the first coding unit 1210 or 1220 is D, a depth of thesecond coding unit 1212 or 1214, the width and height of which are ½times those of the first coding unit 1210 or 1220, may be D+1, and adepth of the third coding unit 1214 or 1224, the width and height ofwhich are ½ times those of the first coding unit 1210 or 1220, may beD+2.

FIG. 13 illustrates depths that are determinable based on shapes andsizes of coding units, and part indexes (PIDs) that are for identifyingthe coding units according to an embodiment.

According to an embodiment, the image decoding device 150 may determinevarious-shaped second coding units by splitting a square first codingunit 1300. Referring to FIG. 13 , the image decoding device 150 maydetermine second coding units 1302 a and 1302 b, 1304 a and 1304 b, and1306 a, 1306 b, 1306 c, and 1306 d by splitting the first coding unit1300 in at least one of vertical and horizontal directions based onsplit shape information. That is, the image decoding device 150 maydetermine the second coding units 1302 a and 1302 b, 1304 a and 1304 b,and 1306 a, 1306 b, 1306 c, and 1306 d, based on the split shapeinformation of the first coding unit 1300.

According to an embodiment, a depth of the second coding units 1302 aand 1302 b, 1304 a and 1304 b, and 1306 a, 1306 b, 1306 c, and 1306 d,which are determined based on the split shape information of the squarefirst coding unit 1300, may be determined based on the length of a longside thereof. For example, because the length of a side of the squarefirst coding unit 1300 equals the length of a long side of thenon-square second coding units 1302 a and 1302 b, and 1304 a and 1304 b,the first coding unit 1300 and the non-square second coding units 1302 aand 1302 b, and 1304 a and 1304 b may have the same depth, e.g., D.However, when the image decoding device 150 splits the first coding unit1300 into the four square second coding units 1306 a, 1306 b, 1306 c,and 1306 d based on the split shape information, because the length of aside of the square second coding units 1306 a, 1306 b, 1306 c, and 1306d is ½ times the length of a side of the first coding unit 1300, a depthof the second coding units 1306 a, 1306 b, 1306 c, and 1306 d may be D+1which is deeper than the depth D of the first coding unit 1300 by 1.

According to an embodiment, the image decoding device 150 may determinea plurality of second coding units 1312 a and 1312 b, and 1314 a, 1314b, and 1314 c by splitting a first coding unit 1310, a height of whichis longer than a width, in a horizontal direction based on the splitshape information. According to an embodiment, the image decoding device150 may determine a plurality of second coding units 1322 a and 1322 b,and 1324 a, 1324 b, and 1324 c by splitting a first coding unit 1320, awidth of which is longer than a height, in a vertical direction based onthe split shape information.

According to an embodiment, a depth of the second coding units 1312 a,1312 b, 1314 a, 1314 b, 1316 a, 1316 b, 1316 c, and 1316 d, which aredetermined based on the split shape information of the non-square firstcoding unit 1310 or 1320, may be determined based on the length of along side thereof. For example, because the length of a side of thesquare second coding units 1312 a and 1312 b is ½ times the length of aside of the first coding unit 1310 having a non-square shape, a heightof which is longer than a width, a depth of the square second codingunits 1302 a, 1302 b, 1304 a, and 1304 b is D+1 which is deeper than thedepth D of the non-square first coding unit 1310 by 1.

Furthermore, the image decoding device 150 may split the non-squarefirst coding unit 1310 into an odd number of second coding units 1314 a,1314 b, and 1314 c based on the split shape information. The odd numberof second coding units 1314 a, 1314 b, and 1314 c may include thenon-square second coding units 1314 a and 1314 c and the square secondcoding unit 1314 b. In this case, because the length of a long side ofthe non-square second coding units 1314 a and 1314 c and the length of aside of the square second coding unit 1314 b are ½ times the length of aside of the first coding unit 1310, a depth of the second coding units1314 a, 1314 b, and 1314 c may be D+1 which is deeper than the depth Dof the first coding unit 1310 by 1. The image decoding device 150 maydetermine depths of coding units split from the non-square first codingunit 1320, a width of which is longer than a height, by using theabove-described method of determining depths of coding units split fromthe first coding unit 1310.

According to an embodiment, the image decoding device 150 may determinePIDs for identifying split coding units, based on a size ratio betweenthe coding units when an odd number of split coding units do not haveequal sizes. Referring to FIG. 13 , the coding unit 1314 b of a centerlocation among the odd number of split coding units 1314 a, 1314 b, and1314 c may have a width which is equal to that of the other coding units1314 a and 1314 c and a height which is two times that of the othercoding units 1314 a and 1314 c. That is, in this case, the coding unit1314 b at the center location may include two of the other coding unit1314 a or 1314 c. Therefore, when a PID of the coding unit 1314 b at thecenter location is 1 based on a scan order, a PID of the coding unit1314 c located next to the coding unit 1314 b may be increased by 2 andthus may be 3. That is, discontinuity in PID values may be present.According to an embodiment, the image decoding device 150 may determinewhether an odd number of split coding units do not have equal sizesbased on whether discontinuity is present in PIDs for identifying thesplit coding units.

According to an embodiment, the image decoding device 150 may determinewhether to use a specific splitting method based on PID values foridentifying a plurality of coding units determined by splitting acurrent coding unit. Referring to FIG. 13 , the image decoding device150 may determine an even number of coding units 1312 a and 1312 b or anodd number of coding units 1314 a, 1314 b, and 1314 c by splitting thefirst coding unit 1310 having a rectangular shape, a height of which islonger than a width. The image decoding device 150 may use PIDsindicating respective coding units so as to identify the respectivecoding units. According to an embodiment, the PID may be obtained from asample of a certain location (e.g., a top left sample) of each codingunit.

According to an embodiment, the image decoding device 150 may determinea coding unit at a certain location from among the split coding units,by using the PIDs for identifying the coding units. According to anembodiment, when the split shape information of the first coding unit1310 having a rectangular shape, a height of which is longer than awidth, indicates to split a coding unit into three coding units, theimage decoding device 150 may split the first coding unit 1310 intothree coding units 1314 a, 1314 b, and 1314 c. The image decoding device150 may assign a PID to each of the three coding units 1314 a, 1314 b,and 1314 c. The image decoding device 150 may compare PIDs of an oddnumber of split coding units to determine a coding unit at a centerlocation from among the coding units. The image decoding device 150 maydetermine the coding unit 1314 b having a PID corresponding to a middlevalue among the PIDs of the coding units, as the coding unit at thecenter location from among the coding units determined by splitting thefirst coding unit 1310. According to an embodiment, the image decodingdevice 150 may determine PIDs for identifying split coding units, basedon a size ratio between the coding units when the split coding units donot have equal sizes. Referring to FIG. 13 , the coding unit 1314 bgenerated by splitting the first coding unit 1310 may have a width whichis equal to that of the other coding units 1314 a and 1314 c and aheight which is two times that of the other coding units 1314 a and 1314c. In this case, when the PID of the coding unit 1314 b at the centerlocation is 1, the PID of the coding unit 1314 c located next to thecoding unit 1314 b may be increased by 2 and thus may be 3. When the PIDis not uniformly increased as described above, the image decoding device150 may determine that a coding unit is split into a plurality of codingunits including a coding unit having a size different from that of theother coding units. According to an embodiment, when the split shapeinformation indicates to split a coding unit into an odd number ofcoding units, the image decoding device 150 may split a current codingunit in such a manner that a coding unit of a certain location (e.g., acoding unit of a center location) among an odd number of coding unitshas a size different from that of the other coding units. In this case,the image decoding device 150 may determine the coding unit of thecenter location, which has a different size, by using PIDs of the codingunits. However, the PID and the size or location of the coding unit ofthe certain location to be determined are not limited to theabove-described examples, and various PIDs and various locations andsizes of coding units may be used.

According to an embodiment, the image decoding device 150 may use acertain data unit where a coding unit starts to be recursively split.

FIG. 14 illustrates that a plurality of coding units are determinedbased on a plurality of certain data units included in a pictureaccording to an embodiment.

According to an embodiment, a certain data unit may be defined as a dataunit where a coding unit starts to be recursively split by using atleast one of block shape information and split shape information. Thatis, the certain data unit may correspond to a coding unit of anuppermost depth, which is used to determine a plurality of coding unitssplit from a current picture. In the following descriptions, forconvenience of explanation, the certain data unit is referred to as areference data unit.

According to an embodiment, the reference data unit may have a certainsize and a certain shape. According to an embodiment, the reference dataunit may include M×N samples. Herein, M and N may be equal to eachother, and may be integers expressed as multipliers of 2. That is, thereference data unit may have a square or non-square shape, and may besplit into an integer number of coding units.

According to an embodiment, the image decoding device 150 may split acurrent picture into a plurality of reference data units. According toan embodiment, the image decoding device 150 may split the plurality ofreference data units, which are split from the current picture, by usingsplit shape information for each reference data unit. An operation ofsplitting the reference data unit may correspond to a splittingoperation using a quadtree structure.

According to an embodiment, the image decoding device 150 may previouslydetermine a minimum size allowed for the reference data units includedin the current picture. Accordingly, the image decoding device 150 maydetermine various reference data units having sizes equal to or greaterthan the minimum size, and may determine one or more coding units byusing the split shape information and block shape information withreference to the determined reference data units.

Referring to FIG. 14 , the image decoding device 150 may use a squarereference coding unit 1400 or a non-square reference coding unit 1402.According to an embodiment, the shape and size of reference coding unitsmay be determined based on various data units capable of including oneor more reference coding units (e.g., sequences, pictures, slices, slicesegments, tiles, tile groups, largest coding units, or the like).

According to an embodiment, the receiver 160 of the image decodingdevice 150 may obtain, from a bitstream, at least one of referencecoding unit shape information and reference coding unit size informationfor each of the various data units. An operation of determining one ormore coding units included in the square reference coding unit 1400 hasbeen described above in relation to the operation of splitting thecurrent coding unit 300 of FIG. 10 , and an operation of determining oneor more coding units included in the non-square reference coding unit1402 has been described above in relation to the operation of splittingthe current coding unit 1100 or 1150 of FIG. 11 , and thus, detaileddescriptions thereof will not be provided here.

According to an embodiment, the image decoding device 150 may use a PIDfor identifying the size and shape of reference coding units, todetermine the size and shape of reference coding units according to somedata units previously determined based on a certain condition. That is,the receiver 160 may obtain, from the bitstream, only the PID foridentifying the size and shape of reference coding units for each slice,slice segment, tile, tile group, or largest coding unit which is a dataunit satisfying a certain condition (e.g., a data unit having a sizeequal to or smaller than a slice) among the various data units (e.g.,sequences, pictures, slices, slice segments, tiles, tile groups, largestcoding units, or the like). The image decoding device 150 may determinethe size and shape of reference data units for each data unit, whichsatisfies the certain condition, by using the PID. When the referencecoding unit shape information and the reference coding unit sizeinformation are obtained and used from the bitstream according to eachdata unit having a relatively small size, efficiency of using thebitstream may not be high, and therefore, only the PID may be obtainedand used instead of directly obtaining the reference coding unit shapeinformation and the reference coding unit size information. In thiscase, at least one of the size and shape of reference coding unitscorresponding to the PID for identifying the size and shape of referencecoding units may be previously determined. That is, the image decodingdevice 150 may determine at least one of the size and shape of referencecoding units included in a data unit serving as a unit for obtaining thePID, by selecting the previously determined at least one of the size andshape of reference coding units based on the PID.

According to an embodiment, the image decoding device 150 may use one ormore reference coding units included in one largest coding unit. Thatis, a largest coding unit split from an image may include one or morereference coding units, and coding units may be determined byrecursively splitting each reference coding unit. According to anembodiment, at least one of a width and height of the largest codingunit may be integer times at least one of the width and height of thereference coding units. According to an embodiment, the size ofreference coding units may be obtained by splitting the largest codingunit n times based on a quadtree structure. That is, the image decodingdevice 150 may determine the reference coding units by splitting thelargest coding unit n times based on a quadtree structure, and may splitthe reference coding unit based on at least one of the block shapeinformation and the split shape information according to variousembodiments.

FIG. 15 illustrates a processing block serving as a unit for determininga determination order of reference coding units included in a picture1500 according to an embodiment.

According to an embodiment, the image decoding device 150 may determineone or more processing blocks split from a picture. The processing blockis a data unit including one or more reference coding units split froman image, and the one or more reference coding units included in theprocessing block may be determined according to a specific order. Thatis, a determination order of one or more reference coding unitsdetermined in each processing block may correspond to one of varioustypes of orders for determining reference coding units, and may varydepending on the processing block. The determination order of referencecoding units, which is determined for each processing block, may be oneof various orders, e.g., raster scan, Z-scan, N-scan, up-right diagonalscan, horizontal scan, and vertical scan, but is not limited to theabove-mentioned scan orders.

According to an embodiment, the image decoding device 150 may obtainprocessing block size information and may determine the size of one ormore processing blocks included in the image. The image decoding device150 may obtain the processing block size information from a bitstreamand may determine the size of one or more processing blocks included inthe image. The size of processing blocks may be a certain size of dataunits, which is indicated by the processing block size information.

According to an embodiment, the receiver 160 of the image decodingdevice 150 may obtain the processing block size information from thebitstream according to each specific data unit. For example, theprocessing block size information may be obtained from the bitstream ina data unit such as an image, sequence, picture, slice, slice segment,tile, or tile group. That is, the receiver 160 may obtain the processingblock size information from the bitstream according to each of thevarious data units, the image decoding device 150 may determine the sizeof one or more processing blocks, which are split from the picture byusing the obtained processing block size information, and the size ofthe processing blocks may be integer times that of the reference codingunits.

According to an embodiment, the image decoding device 150 may determinethe size of processing blocks 1502 and 1512 included in the picture1500. For example, the image decoding device 150 may determine the sizeof processing blocks based on the processing block size informationobtained from the bitstream. Referring to FIG. 15 , according to anembodiment, the image decoding device 150 may determine the width of theprocessing blocks 1502 and 1512 to be four times the width of thereference coding units, and may determine the height of the processingblocks 1502 and 1512 to be four times the height of the reference codingunits. The image decoding device 150 may determine a determination orderof one or more reference coding units in one or more processing blocks.

According to an embodiment, the image decoding device 150 may determinethe processing blocks 1502 and 1512, which are included in the picture1500, based on the size of processing blocks, and may determine adetermination order of one or more reference coding units included inthe processing blocks 1502 and 1512. According to an embodiment,determination of reference coding units may include determination of thesize of the reference coding units.

According to an embodiment, the image decoding device 150 may obtain,from the bitstream, determination order information of one or morereference coding units included in one or more processing blocks, andmay determine a determination order of one or more reference codingunits based on the obtained determination order information. Thedetermination order information may be defined as an order or directionfor determining the reference coding units in the processing block. Thatis, the determination order of reference coding units may beindependently determined for each processing block.

According to an embodiment, the image decoding device 150 may obtain,from the bitstream, the determination order information of referencecoding units according to each specific data unit. For example, thereceiver 160 may obtain the determination order information of referencecoding units from the bitstream according to each data unit such as animage, sequence, picture, slice, slice segment, tile, tile group, orprocessing block. Because the determination order information ofreference coding units indicates an order for determining referencecoding units in a processing block, the determination order informationmay be obtained for each specific data unit including an integer numberof processing blocks.

According to an embodiment, the image decoding device 150 may determineone or more reference coding units based on the determined determinationorder.

According to an embodiment, the receiver 160 may obtain thedetermination order information of reference coding units from thebitstream as information related to the processing blocks 1502 and 1512,and the image decoding device 150 may determine a determination order ofone or more reference coding units included in the processing blocks1502 and 1512 and determine one or more reference coding units, whichare included in the picture 1500, based on the determination order.Referring to FIG. 15 , the image decoding device 150 may determinedetermination orders 1504 and 1514 of one or more reference coding unitsin the processing blocks 1502 and 1512, respectively. For example, whenthe determination order information of reference coding units isobtained for each processing block, different kinds of the determinationorder information of reference coding units may be obtained for theprocessing blocks 1502 and 1512. When the determination order 1504 ofreference coding units in the processing block 1502 is a raster scanorder, reference coding units included in the processing block 1502 maybe determined according to the raster scan order. On the contrary, whenthe determination order 1514 of reference coding units in the otherprocessing block 1512 is a backward raster scan order, reference codingunits included in the processing block 1512 may be determined accordingto the backward raster scan order.

A method of splitting an image into largest coding units and splittingthe largest coding units into coding units having a hierarchical treestructure has been described with reference to FIG. 1A through 15 . Amethod of predicting a current block according to an inter mode will nowbe described with reference to FIGS. 16 through 34 .

FIG. 16 is a block diagram of a video decoding device 1600 for decodinga current block according to an inter mode.

Referring to FIG. 16 , the video decoding device 1600 according to anembodiment may include a processor 1610 and a memory 1620.

The processor 1610 according to an embodiment may generally control thevideo decoding device 1600. The processor 1610 according to anembodiment may execute one or more programs stored in the memory 1620.

The memory 1620 according to an embodiment may store various data,program, or application for driving and controlling the video decodingdevice 1600. The program stored in the memory 1620 may include one ormore instructions. The program (the one or more instructions) or theapplication stored in the memory 1620 may be executed by the processor1610.

The processor 1610 may scan neighboring blocks of a current block,according to a scan order. The processor 1610 may scan, according to thescan order, at least two of neighboring blocks located coveringneighboring pixels A0 1702, A1 1704, A2 1706, B0 1708, B1 1710, C0 1712,and C1 1714 around a current block 1700 of FIG. 17 . Also, the processor1610 may scan neighboring blocks other than the neighboring blockslocated covering the neighboring pixels A0 1702, A1 1704, A2 1706, B01708, B1 1710, C0 1712, and C1 1714. Also, the processor 1610 may scanall blocks around the current block 1700.

Also, the processor 1610 may scan a temporal reference block including aspecific position of the current block 1700 from a reference picture ofthe current block 1700. The specific position may be T1 1716 or T2 1718.For example, the processor 1610 may additionally scan the temporalreference block according to the specific position T0 1716 or T1 1718 aswell as the neighboring blocks located at the neighboring pixels A01702, A1 1704, A2 1706, B0 1708, B1 1710, C0 1712, and C1 1714.

A scan order of at least two of the neighboring blocks located at theneighboring pixels A0 1702, A1 1704, A2 1706, B0 1708, B1 1710, C0 1712,and C1 1714 may be easily set or changed by one of ordinary skill in theart. Likewise, a scan order of at least two of all neighboring blocks ofthe current block 1700 may be easily set and changed by one of ordinaryskill in the art.

According to an embodiment, the processor 1610 may sequentially scan theneighboring block located at the neighboring pixel C0 1712, theneighboring block located at the neighboring pixel B0 1708, theneighboring block located at the neighboring pixel B1 1710, theneighboring block located at the neighboring pixel C1 1714, and theneighboring block located at the neighboring pixel A0 1702, in order todetermine a motion vector candidate of a merge mode. The processor 1610may additionally scan the neighboring block located at the neighboringpixel A1 1704 and the neighboring block located at the neighboring pixelA2 1706. The scan order for determining the motion vector candidate maybe easily changed by one of ordinary skill in the art.

According to an embodiment, the processor 1610 may sequentially scan theneighboring block located at the neighboring pixel B1 1710, theneighboring block located at the neighboring pixel B0 1708, and theneighboring block located at the neighboring pixel A0 1702, in order todetermine a first motion vector candidate of a motion vector prediction(MVP) mode. Also, the processor 1610 may sequentially scan theneighboring block located at the neighboring pixel C1 1714 and theneighboring block located at the neighboring pixel C0 1712, in order todetermine a second motion vector candidate of the MVP mode. According toan embodiment, the processor 1610 may additionally scan the neighboringblock located at the neighboring pixel A1 1704 and the neighboring blocklocated at the neighboring pixel A2 1706, in order to determine thefirst motion vector candidate or the second motion vector candidate. Thescan order for determining the first motion vector candidate or thesecond motion vector candidate may be easily changed by one of ordinaryskill in the art.

The processor 1610 may extract a plurality of inter predictioncandidates from neighboring blocks of a current block by scanning theneighboring blocks. The inter prediction candidate may include a motionvector candidate or a prediction motion vector candidate. Also, theinter prediction candidate may include reference list information andreference picture candidate information. The reference list informationmay indicate list 0 uni-prediction, list 1 uni-prediction, orbi-prediction using both list 0 and list 1. The reference picturecandidate information indicates a reference picture of list 0 and/orlist 1. When the reference list indicates bi-prediction, the interprediction candidate may include a motion vector candidate of list 0 anda motion vector candidate of list 1.

According to an embodiment, when a current block is predicted accordingto a merge mode, the processor 1610 may extract, from neighboringblocks, a motion vector candidate and an inter prediction candidateincluding reference list information and reference picture candidateinformation. Alternatively, when a current block is predicted accordingto an MVP mode, the processor 1610 may extract, from neighboring blocks,an inter prediction candidate including a prediction motion vectorcandidate.

The processor 1610 may generate an inter prediction candidate listincluding a plurality of inter prediction candidates, according to aninter prediction candidate order determined based on a scan order. Forexample, the processor 1610 may extract a first inter predictioncandidate from a neighboring block that is firstly scanned according toa scan order. The processor 1610 may extract a second inter predictioncandidate from a neighboring block that that is scanned after the firstinter prediction candidate is extracted. Until a last inter predictioncandidate is extracted, the processor 1610 may scan neighboring blocks.

When a neighboring block that is firstly scanned does not exist, is notdecoded, or is intra predicted, the processor 1610 may not extract thefirst inter prediction candidate from first scanning. In this case, theprocessor 1610 may attempt to extract the first inter predictioncandidate from a neighboring block that is secondly scanned.Accordingly, the processor 1610 may extract a plurality of interprediction candidates according to a scan order, from neighboring blocksincluding inter prediction candidates.

When all neighboring blocks are scanned according to a scan order but apreset number of inter prediction candidates may not be determined, theprocessor 1610 may determine an additional inter prediction candidate bycombining inter prediction candidates extracted from the neighboringblocks. For example, when five inter prediction candidates are includedin an inter prediction candidate list of a merge mode and four interprediction candidates are extracted from neighboring blocks, theprocessor 1610 may generate a fifth inter prediction candidate bycombining some of the extracted four inter prediction candidates.Alternatively, when all neighboring blocks are scanned according to ascan order but a preset number of inter prediction candidates may not bedetermined, the processor 1610 may determine a zero vector as anadditional inter prediction candidate.

The processor 1610 may extract a first inter prediction candidate fromneighboring blocks located on the left side of the current block 1700including the neighboring blocks located at the neighboring pixels A21702, C0 1710, and C1 1714 in an MVP mode. Also, the processor 1610 mayextract a second inter prediction candidate from neighboring blockslocated above the current block 1700 including the neighboring blockslocated at the neighboring pixels A0 1702, A1 1704, B0 1708, and B1 1710in the MVP mode. When a reference picture of a current block and areference picture of a neighboring block are different from each otherin an MVP mode, the processor 1610 may scale a prediction motion vectoraccording to a temporal distance between a current picture and thereference picture of the current block and a temporal distance betweenthe current picture and the reference picture of the neighboring block.

The processor 1610 may generate an inter prediction candidate list of afirst prediction direction including a plurality of inter predictioncandidates, according to an inter prediction candidate order determinedbased on a scan order in an MVP mode. The processor 1610 may generate aninter prediction candidate list of a second prediction direction, basedon a motion vector generated by adjusting a motion vector candidate ofthe inter prediction candidate list of the first prediction direction,according to a temporal distance between a first reference picture ofthe first prediction direction and a current picture and a temporaldistance between a second reference picture of the second predictiondirection and the current picture.

The first prediction direction and the second prediction directionrespectively indicate prediction directions of list 0 and list 1. Forexample, when the first prediction direction indicates a list 0prediction direction, the second prediction direction indicates a list 1prediction direction. Accordingly, the processor 1610 may derive aninter prediction candidate list of list 1 from an inter predictioncandidate list of list 0.

FIG. 18 illustrates a method of generating a motion vector candidate ofa second prediction direction, by adjusting a motion vector candidate ofa first prediction direction.

In FIG. 18 , a first motion vector 1816 applied to a reference picture1810 of a first prediction direction is illustrated. The first motionvector 1816 is determined according to a first prediction motion vector1812 and a first differential motion vector 1814.

Also, in FIG. 18 , a second motion vector 1826 applied to a referencepicture 1820 of a second prediction direction is illustrated. The secondmotion vector 1826 is determined according to a second prediction motionvector 1822 and a second differential motion vector 1824.

The second prediction motion vector 1822 may be determined by scalingthe first prediction motion vector 1812 according to a temporal distancebetween the first reference picture 1810 and a current picture 1800 anda temporal distance between the second reference picture 1820 and thecurrent picture 1800. Accordingly, the second prediction motion vector1822 of an inter prediction candidate of the second prediction directionmay be determined from the first prediction motion vector 1812 of aninter prediction candidate of the first prediction direction.

The second differential motion vector 1824 may be determined accordingto differential motion vector information obtained from a bitstream.Alternatively, like the second prediction motion vector 1822, the seconddifferential motion vector 1824 may be determined by scaling the firstdifferential motion vector 1814 according to a temporal distance betweenthe first reference picture 1810 and the current picture 1800 and atemporal distance between the second reference picture 1820 and thecurrent picture 1800.

Accordingly, the inter prediction candidate of the second predictiondirection may be determined according to the inter prediction candidateof the first prediction direction, instead of information obtained fromthe bitstream. Hence, because information about the inter predictioncandidate of the second prediction direction is skipped from thebitstream, video coding efficiency may be improved.

According to an embodiment, motion vector derivation informationindicating whether the second motion vector 1826 is derived from thefirst motion vector 1816 may be obtained from the bitstream. Theprocessor 1610 may determine whether the second motion vector 1826 isderived from the first motion vector 1816 according to the motion vectorderivation information. Alternatively, whether the second motion vector1826 is derived from the first motion vector 1816 may be determinedaccording to encoding information obtained for a current block from thebitstream, other than the motion vector derivation information. Forexample, whether the second motion vector 1826 is derived from the firstmotion vector 1816 may be determined according to inter mode informationand/or motion vector information applied to the current block.

The processor 1610 may adaptively change an inter prediction candidateorder of an inter prediction candidate list, according to the currentblock or a plurality of inter prediction candidates. Accordingly, aninter prediction candidate that is likely to be selected may be set tohave a priority. Video coding efficiency may be improved, by allocatinga small number of bits to an inter prediction candidate having a highpriority. A method of changing an inter prediction candidate order of aninter prediction candidate list will be described with reference to FIG.19 .

The processor 1610 may change an inter prediction candidate order, sothat an inter prediction candidate included in a plurality ofneighboring blocks of a current block from among a plurality of interprediction candidates has a priority. For example, in a merge mode, aninter prediction candidate applied in three blocks 1906, 1908, and 1910may be determined as a first inter prediction candidate. An interprediction candidate applied in two blocks 1912 and 1914 may bedetermined as a second inter prediction candidate. Inter predictioncandidates applied in remaining blocks 1902 and 1904 may be determinedas a third inter prediction candidate and a fourth inter predictioncandidate according to a scan order.

The processor 1610 may change the inter prediction candidate order,according to sizes of neighboring blocks of a current block. Forexample, in a merge mode, an inter prediction candidate extracted fromthe block 1904 having a largest size may be determined as a first interprediction candidate. Two inter prediction candidates extracted from theblocks 1902, 1912, and 1914 having a second largest size may bedetermined as a second inter prediction candidate and a third interprediction candidate according to a scan order. An inter predictioncandidate extracted from the blocks 1906, 1908, and 1910 having asmallest size may be determined as a fourth inter prediction candidate.

The processor 1610 may change an inter prediction candidate order,according to at least one of an inter prediction mode and reference listinformation of a plurality of inter prediction candidates. For example,the processor 1610 may change the inter prediction candidate order, sothat an inter prediction candidate whose reference list informationindicates bi-prediction has a priority. Hence, an inter predictioncandidate of the block 1902 whose reference list information indicatesbi-prediction may be determined as a first motion vector candidate.Inter prediction candidates of remaining blocks 1904, 1906, 1908, 1910,1912, and 1914 whose reference list information indicates uni-predictionaccording to list 0 or list 1 may be determined as a second motionvector candidate, a third motion vector candidate, and a fourth motionvector candidate according to a scan order. According to an embodiment,an inter prediction candidate order may be changed so that an interprediction candidate whose reference list information indicatesuni-prediction has a high priority.

The processor 1610 may change an inter prediction candidate order,according to a selection ratio of inter prediction candidates referencedby blocks at the same position as a current block included in picturesreconstructed earlier than a current picture. For example, when theblocks at the same position as the current block included in thepictures reconstructed earlier than the current picture most refer toblocks located at C0 1702, an inter prediction candidate of the block1904 may be determined as a first motion vector candidate.

The processor 1610 may change an inter prediction candidate order, byapplying two or more of the above-described inter prediction candidateorder changing criteria. For example, the processor 1610 may firstchange an inter prediction candidate order according to sizes of blocks,and then may change the inter prediction candidate order according tothe number of blocks to which an inter prediction candidate is applied.

The processor 1610 may predict the current block, based on an interprediction candidate list with the changed inter prediction candidateorder. The processor 1610 may select an inter prediction candidate inthe inter prediction candidate list, according to an inter predictioncandidate index indicating an inter prediction candidate applied to thecurrent block. The processor 1610 may predict the current block based onthe inter prediction candidate according to the inter predictioncandidate index.

The processor 1610 may change an inter prediction candidate order of aninter prediction candidate list of an affine merge mode. An affine modeis an inter prediction method of obtaining an affine parameter frommotion vectors obtained from adjacent samples of a current block, andpredicting the current block according to the affine parameter.

The affine mode may include an affine merge mode and an affine MVP mode.An affine merge mode is an inter prediction method of obtaining anaffine parameter of a current block from a neighboring block predictedaccording to an affine mode from among neighboring blocks of the currentblock, and predicting the current block by using the affine parameter.An affine MVP mode is an inter prediction mode of extracting aprediction affine parameter from a motion vector of neighboring blocksof a current block, and predicting the current block by using an affineparameter determined by adjusting the prediction affine parameter.

In an affine merge mode, when the affine merge mode is applied to acurrent block, the processor 1610 may extract a plurality of interprediction candidates including an affine parameter from neighboringblocks predicted according to an affine mode from among neighboringblocks of the current block, by scanning the neighboring blocks of thecurrent block. The processor 1610 may determine an inter predictioncandidate list including the plurality of inter prediction candidates.Also, the processor 1610 may change an inter prediction candidate orderof the inter prediction candidate list. A method of changing an interprediction candidate order of an inter prediction candidate list of anaffine merge mode will be described with reference to FIG. 20 .

Referring to FIG. 20 , only blocks 2002, 2004, and 2006 from amongneighboring blocks of a current block 2000 are predicted according to anaffine mode. Accordingly, the processor 1610 may determine an interprediction candidate list of an affine merge mode according to an affineparameter extracted from the blocks 2002, 2004, and 2006.

In an embodiment, the processor 1610 may change an inter predictioncandidate order, according to whether a neighboring block of the currentblock is predicted according to the affine merge mode. For example, whenthe block 2006 is predicted according to the affine merge mode and theblocks 2002 and 2004 are predicted according to an affine MVP mode, aninter prediction candidate extracted from the block 2006 may have apriority in the inter prediction candidate list. In contrast, an interprediction candidate extracted from a block predicted according to theaffine MVP mode may have a priority in the inter prediction candidatelist.

In an embodiment, the processor 1610 may change an inter predictioncandidate order according to sizes of blocks. For example, an interprediction candidate of the block 2004 having a largest size may have apriority in the inter prediction candidate list, relative to an interprediction candidate of the blocks 2002 and 2006.

In an embodiment, the processor 1610 may change an inter predictioncandidate order according to reference list information. For example,the processor 1610 may change an inter prediction candidate order, sothat an inter prediction candidate whose reference list informationindicates bi-prediction has a priority. Accordingly, an inter predictioncandidate of the block 2002 whose reference list information indicatesbi-prediction may have a priority in the inter prediction candidatelist, relative to an inter prediction candidate of the blocks 2004 and2006.

The processor 1610 may predict a current block according to an MV planarmode. According to the MV planar mode, the current block is split into aplurality of sub-blocks. A motion vector of each sub-block isdetermined, by double interpolating motion vectors obtained fromadjacent blocks of the current block. The current block is predicted,according to the motion vector of each sub-block. A prediction method ofa current block according an MV planar mode will be described withreference to FIG. 21 .

The processor 1610 obtains a reference motion vector and a referencepicture of a neighboring block adjacent to a current block. Theprocessor 1610 may obtain an upper reference motion vector and an upperreference picture from an upper neighboring block located in a column ofa sub-block and adjacent to the top of the current block. The processor1610 may obtain a left reference motion vector and a left referencepicture from a left neighboring block located in a row of the sub-blockand adjacent to the left side of the current block. The processor 1610may obtain a lower left reference motion vector and a lower leftreference picture from blocks adjacent to a lower left vertex of thecurrent block. The processor 1610 may obtain an upper right referencemotion vector and an upper right reference picture from blocks adjacentto an upper right vertex of the current block.

Referring to FIG. 21 , the processor 1610 may obtain an upper referencemotion vector and an upper reference picture from a block 2104 locatedin a column of a sub-block 2102 and adjacent to the top of a currentblock 2100, in order to determine a motion vector of the sub-block 2102.Also, the processor 1610 may obtain a left reference motion vector and aleft reference picture from a block 2106 located in a row of thesub-block 2102 and adjacent to the left side of the current block 2100.The processor 1610 may obtain a lower left reference motion vector and alower left reference picture from at least one of blocks 2108 and 2110adjacent to a lower left vertex of the current block 2100. The processor1610 may obtain an upper right reference motion vector and an upperright reference picture from at least one of blocks 2104 and 2112adjacent to an upper right vertex of the current block 2100.

The processor 1610 determines a reference picture of the current block.The processor 1610 may obtain reference picture information of blocks ofan upper data unit, from a parameter set of the upper data unit of thecurrent block. The processor 1610 may determine the reference picture ofthe current block, according to the reference picture information.

The processor 1610 adjusts the reference motion vector of theneighboring block, according to a temporal difference between thereference picture of the neighboring block and a current picture and atemporal difference between the reference picture of the current blockand the current picture. The processor 1610 may adjust the upperreference motion vector of the upper neighboring block, according to atemporal difference between the upper reference picture of the upperneighboring block and the current picture and a temporal differencebetween the reference picture of the current block and the currentpicture. The processor 1610 may adjust the left reference motion vectorof the left neighboring block, according to a temporal differencebetween the left reference picture of the left neighboring block and thecurrent picture and a temporal difference between the reference pictureof the current block and the current picture.

For example, a temporal distance between the reference picture of theblock 2112 and the current picture is less than a temporal distancebetween the reference picture of the current block 2100 and the currentpicture. Accordingly, the processor 1610 may adjust the upper rightreference motion vector to be smaller than a motion vector of the block2112.

A temporal distance between the reference picture of the block 2106 andthe current picture is greater than a temporal distance between thereference picture of the current block 2100 and the current picture.Accordingly, the processor 1610 may adjust the left reference motionvector to be larger than the motion vector of the block 2112.

A temporal distance between the reference picture of the block 2104 andthe current picture is the same as a temporal distance between thereference picture of the current block 2100 and the current picture.Accordingly, the processor 1610 may adjust the upper reference motionvector to be the same as the motion vector of the block 2112.

In addition, the reference picture of the block 2110 is located in adirection opposite to the reference picture of the current block 2100temporally from the current picture. Accordingly, the processor 1610 mayadjust the lower left reference motion vector to indicate the oppositedirection of a motion vector of the block 2110.

The processor 1610 determines a motion vector of the sub-block includedin the current block, according to the adjusted reference motion vectorand a position of the sub-block of the current block. The processor 1610may determine the motion vector of the sub-block according to the upperreference motion vector, the left reference motion vector, and theposition of the sub-block.

According to an embodiment, the processor 1610 may determine a weightedaverage of the upper reference motion vector, the left reference motionvector, the lower left reference motion vector, and the upper rightreference motion vector as the motion vector of the sub-block. Theweighted average may be determined according to the position of thesub-block.

In detail, the processor 1610 may determine a first weighted average ofthe upper reference motion vector and the lower left reference motionvector. A weight for determining the first weighted average isdetermined according to a vertical position of the sub-block. Theprocessor 1610 may determine a second weighted average of the leftreference motion vector and the upper right reference motion vector. Aweight for determining the second weighted average is determinedaccording to a horizontal position of the sub-block. The processor 1610may determine the motion vector of the sub-block according to an averagevalue of the first weighted average and the second weighted average.

The processor 1610 predicts the sub-block according to the motion vectorof the sub-block. The processor 1610 may predict the current block, bypredicting all sub-blocks of the current block according to motionvectors of the sub-blocks.

The processor 1610 may determine some of inter prediction elements as adefault value in an MVP mode, or may derive some inter predictionelements from other inter prediction elements. Accordingly, interprediction elements parsed from a bitstream in the MVP mode are reduced.Hence, coding efficiency in the MVP mode may be improved.

The processor 1610 may determine a first inter prediction elementdetermined by parsing a bitstream and a second inter prediction elementdetermined without parsing the bitstream from among inter predictionelements for inter prediction, for a current block. The second interprediction element may include at least one of a prediction direction, adifferential motion vector, and a reference picture of the currentblock. The first inter prediction element includes an inter predictionelement other than the second inter prediction element.

In an embodiment, the processor 1610 may obtain inter prediction elementskip information indicating the first inter prediction element and thesecond inter prediction element for all blocks of an upper data unit,for the upper data unit of the current block, from the bitstream. Theprocessor 1610 may determine the first inter prediction element and thesecond inter prediction element according to the inter predictionelement skip information.

The processor 1610 may determine the first inter prediction element frominter prediction information of the bitstream. The processor 1610 maydetermine the second inter prediction element, based on a default valueof the second inter prediction element or the determined first interprediction element.

In an embodiment, the processor 1610 may determine the default value ofthe second inter prediction element such as a prediction direction, adifferential motion vector, and a reference picture. The processor 1610may obtain inter prediction element default information indicating thedefault value of the second inter prediction element for the upper dataunit of the current block, from the bitstream. The processor 1610 maydetermine the default value of the second inter prediction element,according to the inter prediction element default information.

The processor 1610 may inter predict the current block, based on thefirst inter prediction element and the second inter prediction element.

When bi-directional prediction is performed, coding efficiency may beimproved by determining a differential motion vector of a firstprediction direction according to a differential motion vector of asecond prediction direction. A method of deriving a differential motionvector will now be described.

In an embodiment, the processor 1610 may determine a prediction motionvector of a first prediction direction according to prediction motionvector information obtained from a bitstream, and may determine adifferential motion vector of the first prediction direction accordingto a differential motion vector of a second prediction direction.Because a prediction motion vector is obtained from a reference block ofa current block, the prediction motion vector may be determinedaccording to information indicating a reference block having a small bitsize. For example, when the maximum number of reference blocks fromwhich a prediction motion vector candidate is extracted is set to 8 orless, information indicating a reference block is expressed by using 3bits or less. However, because information indicating a differentialmotion vector is directly obtained from the bitstream, the informationindicating the differential motion vector is larger than the informationindicating the reference block required to determine a prediction motionvector. For example, when an x-component and a y-component of thedifferential motion vector are very large, the information indicatingthe differential motion vector is set to have a size large enough toexpress the differential motion vector. Hence, the informationindicating the differential motion vector having a large size may beskipped, by determining both the differential motion vector of the firstprediction direction and the differential motion vector of the secondprediction direction according to information indicating thedifferential motion vector of the second prediction direction.

In an embodiment, the processor 1610 may determine that the differentialmotion vector of the second prediction direction is a reciprocal of thedifferential motion vector of the first prediction direction.Alternatively, the processor 1610 may determine the differential motionvector of the first prediction direction by adjusting the differentialmotion vector of the second prediction direction, according to atemporal distance between a reference picture of the second predictiondirection and a current picture and a temporal distance between areference picture of the first prediction direction and the currentpicture. Hence, because information about the differential motion vectorof the first prediction direction is not obtained from the bitstream andthe prediction motion vector of the first prediction direction isdetermined according to the differential motion vector of the secondprediction direction, video coding efficiency may be improved

In an embodiment, when a preset condition is satisfied, the processor1610 may determine that the differential motion vector of the secondprediction direction is a reciprocal of the differential motion vectorof the first prediction direction. For example, when the firstprediction indicates a temporally preceding reference picture from thecurrent picture and the second prediction direction indicates atemporally following reference picture from the current picture, it maybe determined that the differential motion vector of the secondprediction direction is a reciprocal of the differential motion vectorof the first prediction direction.

In an embodiment, the processor 1610 may obtain differential motionvector derivation information indicating whether the differential motionvector of the first prediction direction is derived from thedifferential motion vector of the second prediction direction. When thedifferential motion vector derivation information indicates that thedifferential motion vector of the first prediction direction is derivedfrom the differential motion vector of the second prediction direction,the processor 1610 may determine the differential motion vector of thefirst prediction direction according to the differential motion vectorof the second prediction direction.

In an embodiment, when the differential motion vector derivationinformation indicates that the differential motion vector of the firstprediction direction is derived from the differential motion vector ofthe second prediction direction, the processor 1610 may determine thatthe reference picture of the first prediction direction is a referencepicture closest to the current picture in a reference picture listcorresponding to the first prediction direction. For example, when thefirst prediction direction indicates a prediction direction of referencepictures of list 0 temporally following the current picture, it may bedetermined that the reference picture of the first prediction directionis a reference picture closest to the current picture from among thereference pictures of list 0 temporally following the current picture.Accordingly, the processor 1610 may derive the reference picture of thefirst prediction direction according to the differential motion vectorderivation information, without obtaining reference picture informationfrom the bitstream.

Also, when the differential motion vector derivation informationindicates that the differential motion vector of the first predictiondirection is derived from the differential motion vector of the secondprediction direction, the processor 1610 may determine that thereference picture of the second prediction direction is a referencepicture closest to the current picture in a reference picture listcorresponding to the second prediction direction. For example, when thesecond prediction direction indicates a prediction direction ofreference pictures of list 1 temporally preceding the current picture,the processor 1610 may determine that the reference picture of thesecond prediction direction is a reference picture closest to thecurrent picture in the reference pictures of list 1 temporally precedingthe current picture. Accordingly, the processor 1610 may derive thereference picture of the second prediction direction according to thedifferential motion vector derivation information, without obtainingreference picture information from the bitstream.

The processor 1610 may obtain first prediction motion vector informationof the prediction motion vector of the first prediction direction,second prediction motion vector information of a prediction motionvector of the second prediction direction, and differential motionvector information of the differential motion vector of the secondprediction direction, from the bitstream. When the differential motionvector derivation information indicates that the differential motionvector of the first prediction direction is derived from thedifferential motion vector of the second prediction direction, theprocessor 1610 does not obtain information about the differential motionvector of the first prediction direction from the bitstream. Instead,the processor 1610 may determine the differential motion vector of thefirst prediction direction according to the differential motion vectorof the second prediction direction. The processor 1610 determines theprediction motion vector of the first prediction direction, theprediction motion vector of the second prediction direction, and thedifferential motion vector, according to the first prediction motionvector information, the second prediction motion vector information, andthe differential motion vector information.

The processor 1610 determines a motion vector of the first predictiondirection according to the prediction motion vector of the firstprediction direction and the differential motion vector, and determinesa motion vector of the second prediction direction according to theprediction motion vector of the second prediction direction and thedifferential motion vector. The processor 1610 predicts the currentblock, based on the motion vectors of the first prediction direction andthe second prediction direction.

The first prediction direction and the second prediction directionindicate prediction directions of list 0 and list 1. For example, whenthe first prediction direction is a list 0 prediction direction, thesecond prediction direction indicates a list 1 prediction direction. Incontrast, when the first prediction direction indicates a list 1prediction direction, the second prediction direction indicates a list 0prediction direction.

The processor 1610 may predict the current block according to amulti-prediction combination mode. According to the multi-predictioncombination mode, the processor 1610 predicts the current blockaccording to a plurality of prediction methods, obtains a weightedaverage of prediction blocks according to the plurality of predictionmethods, and determines a prediction block of the current block. FIG. 22illustrates a prediction method according to a multi-predictioncombination mode.

In FIG. 22 , a prediction block A 2210 is determined according to anintra mode. Also, a prediction block B 2220 is determined according toan inter mode. A prediction block 2230 is determined according to aweighted average of the prediction block A 2210 and the prediction blockB 2220. When the weighted average is determined, it is determined thatweights of the prediction block A 2210 and the prediction block B 2220are a and b. The prediction block 2230 may be smoothed by using asmoothing filter. The smoothing filter is determined according to ablock size and the number of prediction blocks.

Although a prediction block according to one inter mode and a predictionblock according to one intra mode are combined in FIG. 22 , according toan embodiment, prediction blocks according to a plurality of inter modesand prediction blocks according to a plurality of intra modes may becombined. Also, according to an embodiment, only prediction blocks of aplurality of inter modes may be combined, or only prediction blocks of aplurality of intra modes may be combined. The plurality of inter modesmay include an inter merge mode, an inter advanced motion vectorprediction (AMVP) mode, and an inter skip mode.

The processor 1610 may determine whether a multi-prediction combinationmode for predicting a current block by combining prediction resultsobtained according to a plurality of prediction modes is applied to thecurrent block. The processor 1610 may obtain multi-predictioncombination mode information indicating whether the multi-predictioncombination mode is applied to the current block from a bitstream. Theprocessor 1610 may determine whether the multi-prediction combinationmode is applied to the current block, according to the multi-predictioncombination mode information.

In an embodiment, the processor 1610 may determine whether themulti-prediction combination mode is applied to the current block,according to an area, a height, and a width of the current block. Forexample, when the area of the current block is 64 or more, the processor1610 may determine whether the multi-prediction combination mode isapplied to the current block. The processor 1610 may determine whetherthe multi-prediction combination mode is applied to the current blockaccording to the multi-prediction combination mode obtained from thebitstream. In contrast, when the area of the current block is 64 orless, the processor 1610 may determine that the multi-predictioncombination mode is not applied to the current block.

The processor 1610 may obtain prediction monde number informationindicating the number of the plurality of prediction modes from thebitstream. The processor 1610 may determine the number of the pluralityof prediction modes to be applied to the current block according to theprediction mode number information.

According to an embodiment, the processor 1610 may determine a maximumnumber of the plurality of prediction modes to be applied to the currentblock, according to a size of the current block. For example, theprocessor 1610 may determine that as the size of the current blockincreases, the maximum number of the plurality of prediction modesincreases. In contrast, the processor 1610 may determine that as thesize of the current block decreases, the maximum number of the pluralityof prediction modes decreases.

When the multi-prediction combination mode is applied to the currentblock, the processor 1610 may determine the plurality of predictionmodes to be applied to the current block. The processor 1610 may obtainprediction mode information indicating the plurality of prediction modesfrom the bitstream. The processor 1610 may determine the plurality ofprediction modes to be applied to the current block according to theprediction mode information.

The processor 1610 may generate a plurality of prediction blocks for thecurrent block, according to the plurality of prediction modes. Theprocessor 1610 may determine a combined prediction block of the currentblock, by combining the plurality of prediction blocks according torespective weights.

The processor 1610 may smooth the combined prediction block of thecurrent block by using a smoothing filter. The processor 1610 maydetermine the smoothing filter according to the size of the currentblock. For example, when the current block has a large size, theprocessor 1610 may use a smoothing filter with a large number of taps.When the current block has a small size, the processor 1610 may use asmoothing filter with a small number of taps.

The processor 1610 may determine the smoothing filter according to thenumber of the plurality of prediction modes to be applied to the currentblock. For example, when the number of the plurality of prediction modesis large, the processor 1610 may use a smoothing filter with a smallnumber of taps. When the number of the plurality of prediction modes issmall, the processor 1610 may use a smoothing filter with a large numberof taps.

The processor 1610 may split the current block according to a triangularsplit mode. The triangular split mode is a coding method of splitting ablock into triangular sub-blocks. When the triangular split mode isapplied to blocks having different characteristics along a diagonalline, coding efficiency may be improved. FIG. 23 illustrates a method ofsplitting a current block according to a triangular split mode.

A block 2300 is split in a lower rightward direction. Two sub-blocks2304 and 2306 are predicted. Pixels 2302 located on a split boundary aresmoothed by using a smoothing filter. A block 2310 is split in a lowerleftward direction. Two sub-blocks 2314 and 2316 are predicted. Pixels2312 located on a split boundary are smoothed by using the smoothingfilter. The pixels 2302 and 2312 located on the split boundaries aresmoothed by applying the smoothing filters to neighboring pixels. As thepixels 2302 and 2312 located on the split boundaries are smoothed,prediction accuracy according to a triangular split mode is improved.

The processor 1610 determines a split mode of the current block, fromamong a rectangular split mode and a triangular split mode. Theprocessor 1610 may obtain split type information indicating one of therectangular split mode and the triangular split mode from a bitstream.The processor 1610 may determine the split mode of the current blockaccording to the split type information.

According to an embodiment, when the current block is in a merge mode ora skip mode, the processor 1610 may determine the split mode of thecurrent block from among the rectangular split mode and the triangularsplit mode. In contrast, when the current block is not in a merge modeor a skip mode, the processor 1610 may determine only the rectangularsplit mode as the split mode of the current block.

When the current block is split according to the triangular split mode,the processor 1610 may determine one of a lower rightward direction anda lower leftward direction as a split direction of the current block.The processor 1610 may obtain split direction information indicating oneof the lower rightward direction and the lower leftward direction fromthe bitstream. The processor 1610 may determine the split direction ofthe current block according to the split direction information.

The processor 1610 may split the current block into a plurality ofsub-blocks, according to the split mode of the current block. Theprocessor 1610 may predict the plurality of sub-blocks.

The processor 1610 may smooth prediction pixels located on a boundaryline of a prediction block of the plurality of sub-blocks by using asmoothing filter. The processor 1610 may determine the number of filtercoefficients and values of the filter coefficients of the smoothingfilter according to the split mode of the current block. For example,the number of taps of a smoothing filter applied to sub-blocks splitaccording to the triangular split mode may be set to be greater than thenumber of taps of a smoothing filter applied to sub-blocks splitaccording to the rectangular split mode.

FIG. 24 is a flowchart of a video decoding method 2400 of changing aninter prediction order of an inter prediction candidate list.

In operation 2410, a plurality of inter prediction candidates areextracted from neighboring blocks of a current block, by scanning theneighboring blocks of the current block, according to a scan order.

In operation 2420, an inter prediction candidate list including theplurality of inter prediction candidates is generated, according to aninter prediction candidate order determined based on the scan order.

According to an embodiment, when an affine mode is applied to thecurrent block, a plurality of inter prediction candidates including anaffine parameter may be extracted from neighboring blocks predictedaccording to the affine mode from among the neighboring blocks of thecurrent block, by scanning the neighboring blocks of the current block,according to the scan order.

According to an embodiment, an inter prediction candidate list of afirst prediction direction including the plurality of inter predictioncandidates may be generated, according to the inter prediction candidateorder determined based on the scan order. An inter prediction candidatelist of a second prediction direction may be generated, based on amotion vector generated by adjusting a motion vector candidate of theinter prediction candidate list of the first prediction direction,according to a temporal distance between a first reference picture ofthe first prediction direction and a current picture and a temporaldistance between a second reference picture of the second predictiondirection and the current picture.

In operation 2430, the inter prediction candidate order of the interprediction candidate list is changed, adaptively according to thecurrent block or the plurality of inter prediction candidates.

According to an embodiment, the inter prediction candidate order may bechanged, so that an inter prediction candidate included in the pluralityof neighboring blocks of the current block from among the plurality ofinter prediction candidates has a priority.

According to an embodiment, the inter prediction candidate order may bechanged, according to sizes of the neighboring blocks of the currentblock.

According to an embodiment, the inter prediction candidate order may bechanged, according to at least one of reference list information and aninter prediction mode of the plurality of inter prediction candidates.

According to an embodiment, the inter prediction candidate order may bechanged, according to a selection ratio of inter prediction candidatesreferenced by blocks at the same position as the current block includedin pictures reconstructed earlier than the current picture.

According to an embodiment, when an affine merge mode is applied to thecurrent block, the inter prediction candidate order may be changed,according to whether the neighboring blocks of the current block arepredicted according to the affine merge mode.

In operation 2440, the current block is predicted, based on the interprediction candidate list in which the inter prediction candidate orderis changed.

A function of the video decoding device 1600 of FIG. 16 may be includedin the video decoding method 2400.

FIG. 25 is a flowchart of a video decoding method 2500 of predicting acurrent block according to an MV planar mode.

In operation 2510, a reference motion vector and a reference picture ofa neighboring block adjacent to a current block are obtained.

According to an embodiment, an upper reference motion vector and anupper reference picture may be obtained from an upper neighboring blocklocated in a column of a sub-block and adjacent to the top of a currentblock. A left reference motion vector and a left reference picture maybe obtained from a left neighboring block located in a row of thesub-block and adjacent to the left side of the current block.

In operation 2520, a reference picture of the current block isdetermined.

According to an embodiment, reference picture information of an upperdata unit may be obtained, from a parameter set of the upper data unitof the current block. The reference picture of the current block may bedetermined, according to the reference picture information.

In operation 2530, the reference motion vector of the neighboring blockis adjusted, according to a temporal difference between the referencepicture of the neighboring block and a current picture and a temporaldifference between the reference picture of the current block and thecurrent picture.

According to an embodiment, the upper reference motion vector of theupper neighboring block may be adjusted, according to a temporaldifference between the upper reference picture of the upper neighboringblock and the current picture and a temporal difference between thereference picture of the current block and the current picture. The leftreference motion vector of the left neighboring block may be adjusted,according to a temporal difference between the left reference picture ofthe left neighboring block and the current picture and a temporaldifference between the reference picture of the current picture and thecurrent picture.

In operation 2540, a motion vector of the sub-block included in thecurrent block is determined, according to the adjusted reference motionvector and a position of the sub-block of the current block.

According to an embodiment, the motion vector of the sub-block may bedetermined according to the upper reference motion vector, the leftreference motion vector, and the position of the sub-block.

In operation 2550, the sub-block is predicted according to the motionvector of the sub-block.

A function of the video decoding device 1600 of FIG. 16 may be includedin the video decoding method 2500.

FIG. 26 is a flowchart of a video decoding method 2600 of improvingcoding efficiency by deriving a differential motion vector of a firstprediction direction from a differential motion vector of a secondprediction direction.

In operation 2610, differential motion vector derivation informationindicating whether a differential motion vector of a first predictiondirection is derived from a differential motion vector of a secondprediction direction is obtained, from a bitstream.

In operation 2620, first prediction motion vector information about aprediction motion vector of the first prediction direction, secondprediction motion vector information about a prediction motion vector ofthe second prediction direction, and differential motion vectorinformation about a differential motion vector of the second predictiondirection are obtained, from the bitstream.

In operation 2630, the prediction motion vector of the first predictiondirection, and the prediction motion vector and the differential motionvector of the second prediction direction are determined, according tothe first prediction motion vector information, the second predictionmotion vector information, and the differential motion vectorinformation.

In operation 2640, when the differential motion vector derivationinformation indicates that the differential motion vector of the firstprediction direction is derived from the differential motion vector ofthe second prediction direction, the differential motion vector of thefirst prediction direction is determined according to the differentialmotion vector of the second prediction direction.

In operation 2650, a motion vector of the first prediction direction isdetermined according to the prediction motion vector and thedifferential motion vector of the first prediction direction, and amotion vector of the second prediction direction is determined accordingto the prediction motion vector and the differential motion vector ofthe second prediction direction.

In operation 2660, a current block is predicted according to the motionvector of the first prediction direction and the motion vector of thesecond prediction direction.

According to an embodiment, when the differential motion vectorderivation information indicates that the differential motion vector ofthe first prediction direction is derived from the differential motionvector of the second prediction direction, it may be determined that areference picture of the first prediction direction is a referencepicture temporally closest to a current picture from among referencepictures included in a reference picture list of the first predictiondirection. Also, it may be determined that a reference picture of thesecond prediction direction is a reference picture temporally closest tothe current picture from among reference pictures included in areference picture list of the second prediction direction.

A function of the video decoding device 1600 of FIG. 16 may be includedin the video decoding method 2600.

FIG. 27 is a flowchart of a video decoding method 2700 of predicting acurrent block according to a multi-prediction combination mode.

In operation 2710, whether a multi-prediction combination mode forpredicting a current block is applied to the current block by combiningprediction results obtained according to a plurality of predictionmodes, according to a size of the current block.

In operation 2720, when the multi-prediction combination mode is appliedto the current block, the plurality of prediction modes to be applied tothe current block are determined. The plurality of prediction modes mayinclude at least one of an intra mode, an inter merge mode, an interAMVP mode, and an inter skip mode.

In operation 2730, a plurality of prediction blocks of the current blockare generated, according to the plurality of prediction modes.

According to an embodiment, a maximum number of the plurality ofprediction modes to be applied to the current block may be determined,according to the size of the current block.

In operation 2740, a combined prediction block of the current block isdetermined, by combining the plurality of prediction blocks according torespective weights.

According to an embodiment, the combined prediction block of the currentblock may be smoothed by using a smoothing filter. The smoothing filtermay be determined according to the number of the plurality of predictionmodes to be applied to the current block and the size of the currentblock.

A function of the video decoding device 1600 of FIG. 16 may be includedin the video decoding method 2700.

FIG. 28 is a flowchart of a video decoding method 2800 of reconstructinga current block according to a triangular split mode.

In operation 2810, a split mode of a current block is determined, fromamong a rectangular split mode and a triangular split mode.

According to an embodiment, when the current block is split according tothe triangular split mode, it may be determined that a split directionof the current block is one of a lower rightward direction and a lowerleftward direction.

According to an embodiment, when the current block is in a merge mode ora skip mode, the split mode of the current block may be determined fromamong the rectangular split mode and the triangular split mode. Incontrast, when the current block is not in a merge mode or a skip mode,only the rectangular split mode may be determined as the split mode ofthe current block.

In operation 2820, the current block is split into a plurality ofsub-blocks, according to the split mode of the current block.

In operation 2830, a prediction block of the plurality of sub-blocks isdetermined.

In operation 2840, prediction pixels located on a boundary line of theprediction block of the plurality of sub-blocks are smoothed by using asmoothing filter. The number of filter coefficients and the values offilter coefficients of the smoothing filter may be determined accordingto the split mode of the current block.

A function of the video decoding device 1600 of FIG. 16 may be includedin the video decoding method 2800.

FIG. 29 is a block diagram of a video encoding device 2900 for encodinga current block according to an inter mode.

Referring to FIG. 29 , the video encoding device 2900 according to anembodiment may include a processor 2910 and a memory 2920.

The processor 2910 according to an embodiment may generally control thevideo encoding device 2900. The processor 2910 according to anembodiment may execute one or more programs stored in the memory 2920.

The memory 2920 according to an embodiment may store various data,program, or application for driving and controlling the video encodingdevice 2900. The program stored in the memory 2920 may include one ormore instructions. The program (the one or more instructions) or theapplication stored in the memory 2920 may be executed by the processor2910.

The video encoding device 2900 may improve coding efficiency by changingan inter prediction candidate order of an inter prediction candidatelist. The inter prediction candidate order may be changed as follows.

The processor 2910 may extract a plurality of inter predictioncandidates from neighboring blocks of a current block, by scanning theneighboring blocks of the current block, according to a scan order.

The processor 2910 may generate an inter prediction candidate listincluding the plurality of inter prediction candidates, according to aninter prediction candidate order determined based on the scan order.

The processor 2910 may change the inter prediction candidate order ofthe inter prediction candidate list, adaptively according to the currentblock or the plurality of inter prediction candidates.

The processor 2910 may determine an inter prediction candidate havinghighest prediction accuracy from among the plurality of inter predictioncandidates of the inter prediction candidate list. The processor 2910may generate an inter prediction candidate index indicating the interprediction candidate having highest prediction accuracy.

The video encoding device 2900 may predict the current block accordingto an MV planar mode. The current block is predicted according to the MVplanar mode as follows.

The processor 2910 may determine a reference picture of the currentblock.

The processor 2910 may adjust a reference motion vector of a neighboringblock, according to a temporal difference between a reference picture ofthe neighboring block and a current picture and a temporal differencebetween the reference picture of the current block and the currentpicture.

The processor 2910 may determine a motion vector of a sub-block includedin the current block, according to the adjusted reference motion vectorand a position of the sub-block of the current block.

The processor 2910 may predict the sub-block according to the motionvector of the sub-block.

The video encoding device 2900 may improve coding efficiency bydetermining a specific inter prediction element without parsing abitstream. An encoding method of skipping encoding information about thespecific inter prediction element is performed as follows.

The processor 2910 may determine a first inter prediction element whoseencoding information is generated and a second inter prediction elementwhose encoding information is not generated from among inter predictionelements for inter prediction, for the current block.

The processor 2910 may determine candidates of the first interprediction element. The processor 2910 may determine the second interprediction element, based on a default value of the second interprediction element or the determined candidates of the first interprediction element.

The processor 2910 may predict the current block, based on the firstinter prediction element and the second inter prediction element. Theprocessor 2910 may generate inter prediction information fordistinguishing the first inter prediction element and the second interprediction element.

The video encoding device 2900 may predict the current block accordingto a multi-prediction combination mode. A prediction method according tothe multi-prediction combination mode is performed as follows.

The processor 2910 may determine whether the multi-predictioncombination mode is applied to the current block. When themulti-prediction combination mode is applied to the current block, theprocessor 2910 may determine a plurality of prediction modes to beapplied to the current block.

The processor 2910 may generate a plurality of prediction blocks for thecurrent block, according to the plurality of prediction modes.

The processor 2910 may determine a combined prediction block of thecurrent block, by combining the plurality of prediction blocks accordingto respective weights.

The processor 2910 may generate multi-prediction combination modeinformation indicating whether the multi-prediction combination mode isapplied to the current block and prediction mode information indicatingthe plurality of prediction modes.

The video encoding device 2900 may split the current block according toa triangular split mode. A splitting method according to the triangularsplit mode is performed as follows.

The processor 2910 may determine a split mode of the current block, fromamong a rectangular split mode and a triangular split mode according toa prediction result of the current block. The processor 2910 may splitthe current block into a plurality of sub-blocks, according to the splitmode of the current block.

The processor 2910 may determine a prediction block of the plurality ofsub-blocks. The processor 2910 may smooth prediction pixels located on aboundary line of the prediction block of the plurality of sub-blocks byusing a smoothing filter. The processor 2910 may determine the number offilter coefficients and the values of filter coefficients of thesmoothing filter according to the split mode of the current block.

FIG. 30 is a flowchart of a video encoding method 2400 of changing aninter prediction order of an inter prediction candidate list.

In operation 3010, a plurality of inter prediction candidates areextracted from neighboring blocks of a current block, by scanning theneighboring blocks of the current block, according to a scan order.

In operation 3020, an inter prediction candidate list including theplurality of inter prediction candidates is generated, according to aninter prediction candidate order determined based on the scan order.

In operation 3030, the inter prediction candidate order of the interprediction candidate list is changed, adaptively according to thecurrent block or the plurality of inter prediction candidates.

In operation 3040, an inter prediction candidate having highestprediction accuracy is determined from among the plurality of interprediction candidates of the inter prediction candidate list. An interprediction candidate index indicating the inter prediction candidatehaving highest prediction accuracy may be generated.

A function of the video encoding device 2900 of FIG. 29 may be includedin the video encoding method 3000.

FIG. 31 is a flowchart of a video encoding method 3100 of predicting acurrent block according to an MV planar mode.

In operation 3110, a reference picture of a current block is determined.

In operation 3120, a reference motion vector of a neighboring block isadjusted, according to a temporal difference between a reference pictureof the neighboring block and a current picture and a temporal differencebetween the reference picture of the current block and the currentpicture.

In operation 3130, a motion vector of a sub-block included in thecurrent block is determined, according to the adjusted reference motionvector and a position of the sub-block of the current block.

In operation 3140, the sub-block is predicted according to the motionvector of the sub-block.

A function of the video encoding device 2900 may be included in thevideo encoding method 3100.

FIG. 32 is a flowchart of a video encoding method 3200 of improvingcoding efficiency by not generating information about a specific interprediction element.

In operation 3210, a prediction motion vector of a first predictiondirection and a prediction motion vector and a differential motionvector of a second prediction direction, applied to a current block, aredetermined.

In operation 3220, a differential motion vector of the first predictiondirection is determined according to the differential motion vector ofthe second prediction direction.

In operation 3230, whether the differential motion vector of the firstprediction direction is determined according to the differential motionvector of the second prediction direction is determined, according toprediction accuracy of the differential motion vector of the firstprediction direction determined according to the differential motionvector of the second prediction direction.

In operation 3240, differential motion vector derivation informationindicating whether the differential motion vector of the firstprediction direction is determined according to the differential motionvector of the second prediction direction is determined.

A function of the video encoding device 2900 of FIG. 29 may be includedin the video encoding method 3200.

FIG. 33 is a flowchart of a video encoding method 3300 of predicting acurrent block according to a multi-prediction combination mode.

In operation 3310, whether a multi-prediction combination mode isapplied to a current block is determined, based on the area of thecurrent block.

In operation 3320, when the multi-prediction combination mode is appliedto the current block, a plurality of prediction modes to be applied tothe current block are determined.

In operation 3330, a plurality of prediction blocks for the currentblock are generated, according to the plurality of prediction modes.

In operation 3340, a combined prediction block of the current block isdetermined, by combining the plurality of prediction blocks according torespective weights.

In operation 3350, multi-prediction combination mode informationindicating whether the multi-prediction combination mode is applied tothe current block and prediction mode information indicating theplurality of prediction modes are generated.

A function of the video encoding device 2900 of FIG. 29 may be includedin the video encoding method 3300.

FIG. 34 is a flowchart of a video decoding method 3400 of reconstructinga current block according to a triangular split mode.

In operation 3410, a split mode of a current block is determined, fromamong a rectangular split mode and a triangular split mode according toa prediction result of the current block.

In operation 3420, the current block is split into a plurality ofsub-blocks, according to the split mode of the current block.

In operation 3430, a prediction block of the plurality of sub-blocks isdetermined.

In operation 3440, prediction pixels located on a boundary line of theprediction block of the plurality of sub-blocks are smoothed by using asmoothing filter.

A function of the video decoding method 2800 of FIG. 28 may be includedin a video encoding method 3400 (the video decoding method 3400?).

According to a video encoding method based on coding units having a treestructure described with reference to FIG. 1A through 34, image data ina spatial domain is encoded according to the coding units having thetree structure, and according to a video decoding method based on thecoding units having the tree structure, decoding is performed accordingto largest coding units and the image data in the spatial domain isreconstructed, and thus a video such as a picture and a picture sequencemay be reconstructed. The reconstructed video may be played by aplayback device, may be stored in a storage medium, and may betransmitted through a network.

Meanwhile, the embodiments of the present disclosure may be implementedas a computer-executable program, and may be implemented in ageneral-purpose digital computer that operates the program using acomputer-readable recording medium.

It will be understood by one of ordinary skill in the art that, whileoptimal embodiments of the present disclosure have been described,various substitutes, modifications, and amendments, may be made to theone or more embodiments. That is, the substitutes, modifications, andamendments do not depart from the scope of the present disclosure andare encompassed in the present disclosure. Hence, the embodiments shouldbe considered in a descriptive sense only and not for purposes oflimitation.

1. A video decoding method performed by a device and comprising: when atleast one of a width and a height of a current coding unit is equal toor greater than a predetermined value, obtaining, from a bitstream,information indicating whether a combined prediction is applied for thecurrent coding unit; when the information indicates that the combinedprediction is applied for the current coding unit, obtaining an interprediction block by performing inter prediction on the current codingunit using a merge candidate list; when the information indicates thatthe combined prediction is applied for the current coding unit,obtaining an intra prediction block by performing intra prediction onthe current coding unit in a planar mode; and obtaining a combinedprediction block of the current coding unit by combining the intraprediction block and the inter prediction block according to a weightvalue, wherein the predetermined value is
 8. 2. A video decoding devicecomprising: a processor; and a memory including instructions that, whenexecuted by the processor, drive the video decoding device to perform avideo decoding operation comprising: when at least one of a width and aheight of a current coding unit is equal to or greater than apredetermined value, obtaining, from a bitstream, information indicatingwhether a combined prediction is applied for the current coding unit;when the information indicates that the combined prediction is appliedfor the current coding unit, obtaining an inter prediction block byperforming inter prediction on the current coding unit using a mergecandidate list; when the information indicates that the combinedprediction is applied for the current coding unit, obtaining an intraprediction block by performing intra prediction on the current codingunit in a planar mode; and obtaining a combined prediction block of thecurrent coding unit by combining the intra prediction block and theinter prediction block according to a weight value, wherein thepredetermined value is
 8. 3. A video encoding method performed by adevice and comprising: when at least one of a width and a height of acurrent coding unit is equal to or greater than a predetermined value,obtaining information indicating whether a combined prediction isapplied for the current coding unit; when the information indicates thatthe combined prediction is applied for the current coding unit,obtaining an inter prediction block by performing inter prediction onthe current coding unit using a merge candidate list; when theinformation indicates that the combined prediction is applied for thecurrent coding unit, obtaining an intra prediction block by performingintra prediction on the current coding unit in a planar mode; andobtaining a combined prediction block of the current coding unit bycombining the intra prediction block and the inter prediction blockaccording to a weight value, wherein the predetermined value is 8.